HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
unicodeUtils.h File Reference
#include "pxr/pxr.h"
#include "pxr/base/tf/api.h"
#include "pxr/base/tf/diagnostic.h"
#include <ostream>
#include <string>
#include <string_view>
+ Include dependency graph for unicodeUtils.h:

Go to the source code of this file.

Classes

class  TfUtf8CodePoint
 
class  TfUtf8CodePointIterator
 
class  TfUtf8CodePointIterator::PastTheEndSentinel
 
class  TfUtf8CodePointView
 

Functions

TF_API std::ostream & operator<< (std::ostream &, const TfUtf8CodePoint)
 
constexpr TfUtf8CodePoint TfUtf8CodePointFromAscii (const char value)
 Constructs a TfUtf8CodePoint from an ASCII charcter (0-127). More...
 
TF_API bool TfIsUtf8CodePointXidStart (uint32_t codePoint)
 
bool TfIsUtf8CodePointXidStart (const TfUtf8CodePoint codePoint)
 
TF_API bool TfIsUtf8CodePointXidContinue (uint32_t codePoint)
 
bool TfIsUtf8CodePointXidContinue (const TfUtf8CodePoint codePoint)
 

Detailed Description

Definitions of basic UTF-8 utilities in tf.

Definition in file unicodeUtils.h.

Function Documentation

TF_API std::ostream& operator<< ( std::ostream &  ,
const TfUtf8CodePoint   
)
TF_API bool TfIsUtf8CodePointXidContinue ( uint32_t  codePoint)

Determines whether the given Unicode codePoint is in the XID_Continue character class.

The XID_Continue class of characters include those in XID_Start plus characters having the Unicode General Category of nonspacing marks, spacing combining marks, decimal number, and connector punctuation. That is, the character must have a category of XID_Start | Nd | Mn | Mc | Pc

bool TfIsUtf8CodePointXidContinue ( const TfUtf8CodePoint  codePoint)
inline

Determines whether the given Unicode codePoint is in the XID_Continue character class. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 431 of file unicodeUtils.h.

TF_API bool TfIsUtf8CodePointXidStart ( uint32_t  codePoint)

Determines whether the given Unicode codePoint is in the XID_Start character class.

The XID_Start class of characters are derived from the Unicode General_Category of uppercase letters, lowercase letters, titlecase letters, modifier letters, other letters, letters numbers, plus Other_ID_Start, minus Pattern_Syntax and Pattern_White_Space code points. That is, the character must have a category of Lu | Ll | Lt | Lm | Lo | Nl

bool TfIsUtf8CodePointXidStart ( const TfUtf8CodePoint  codePoint)
inline

Determines whether the given Unicode codePoint is in the XID_Start character class. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 410 of file unicodeUtils.h.

constexpr TfUtf8CodePoint TfUtf8CodePointFromAscii ( const char  value)

Constructs a TfUtf8CodePoint from an ASCII charcter (0-127).

Definition at line 102 of file unicodeUtils.h.