Foxit PDF SDK
|
WIDE STRING CLASS. More...
Inherits CFX_Object.
Public Member Functions | |
CFX_WideString () | |
Construct a null wide string. | |
CFX_WideString (const CFX_WideString &str) | |
Copy constructor. More... | |
CFX_WideString (const CFX_WideStringC &str) | |
Construct from a constant ref to a CFX_WideStringC object. More... | |
CFX_WideString (const CFX_WideStringC &str1, const CFX_WideStringC &str2) | |
Concatenate constructor. More... | |
CFX_WideString (FX_LPCWSTR ptr, FX_STRSIZE len=-1) | |
Construct from a wide character string. More... | |
CFX_WideString (FX_WCHAR ch) | |
Construct from a single wide character. More... | |
~CFX_WideString () | |
The Destructor. | |
int | Compare (const CFX_WideString &str) const |
Compare the the string with another. Case-sensitive. More... | |
int | Compare (FX_LPCWSTR str) const |
Compare current string with a wide character string. Case-sensitive. More... | |
int | CompareNoCase (FX_LPCWSTR str) const |
Compare the the string with a wide character string. No case-insensitive. More... | |
void | ConvertFrom (const CFX_ByteString &str, CFX_CharMap *pCharMap=NULL) |
Load MBCS data into this wide string, using specified character mapper. More... | |
FX_STRSIZE | Delete (FX_STRSIZE index, FX_STRSIZE count=1) |
Delete one or more wide characters starting from specific position. More... | |
void | Empty () |
Set this string to be empty. More... | |
bool | Equal (const CFX_WideStringC &str) const |
Check if current string is equal to another. More... | |
FX_STRSIZE | Find (FX_LPCWSTR lpszSub, FX_STRSIZE start=0) const |
Find a sub-string, from specific position. Only first occurrence is found. More... | |
FX_STRSIZE | Find (FX_WCHAR ch, FX_STRSIZE start=0) const |
Find a character, from specific position. Only first occurrence is found. More... | |
void | Format (FX_LPCWSTR lpszFormat,...) |
Format a number of parameters into this wide string. More... | |
void | FormatV (FX_LPCWSTR lpszFormat, va_list argList) |
Format a number of parameters into this wide string. using va_list. More... | |
FX_WCHAR | GetAt (FX_STRSIZE nIndex) const |
Retrieves a single wide character specified by an index number. More... | |
FX_LPWSTR | GetBuffer (FX_STRSIZE len) |
Get a buffer with specific number of characters allocated. More... | |
FX_FLOAT | GetFloat () const |
Convert to other data type. More... | |
int | GetInteger () const |
Convert to other data type. More... | |
FX_STRSIZE | GetLength () const |
Get number of characters, not bytes. Trailing zero not counted. More... | |
FX_STRSIZE | Insert (FX_STRSIZE index, FX_WCHAR ch) |
Insert a wide character before specific position. More... | |
FX_BOOL | IsEmpty () const |
Check whether current string object is empty. More... | |
CFX_WideString | Left (FX_STRSIZE count) const |
Extracts the first (leftmost) count wide characters from this CFX_WideString object as a sub-string. More... | |
FX_LPWSTR | LockBuffer () |
Lock and get the current string buffer, so the caller can modify the returned buffer. Caller can modified the returned buffer, and should call CFX_WideString::ReleaseBuffer after modification done. More... | |
void | MakeLower () |
Change case of English letters to lower. More... | |
void | MakeUpper () |
Change case of English letters to upper. More... | |
CFX_WideString | Mid (FX_STRSIZE first) const |
Extracts a substring from this CFX_WideString object, starting at position nFirst (zero-based) to last. More... | |
CFX_WideString | Mid (FX_STRSIZE first, FX_STRSIZE count) const |
Extracts a substring of count wide character from this CFX_WideString object, starting at position nFirst (zero-based) to last. More... | |
operator FX_LPCWSTR () const | |
FX_LPCWSTR type conversion operator. | |
const CFX_WideString & | operator+= (const CFX_WideString &str) |
Concatenation(+=) operator overload. Concatenate a wide string. More... | |
const CFX_WideString & | operator+= (const CFX_WideStringC &str) |
Concatenation(+=) operator overload. Concatenate a constant wide string. More... | |
const CFX_WideString & | operator+= (FX_LPCWSTR str) |
Concatenation(+=) operator overload. Concatenate a wide character string. More... | |
const CFX_WideString & | operator+= (FX_WCHAR ch) |
Concatenation(+=) operator overload. Concatenate a single wide character. More... | |
const CFX_WideString & | operator= (const CFX_WideString &stringSrc) |
Assignment(=) operator overload. From a wide string. More... | |
const CFX_WideString & | operator= (const CFX_WideStringC &stringSrc) |
Assignment(=) operator overload. From a const wide string. More... | |
const CFX_WideString & | operator= (FX_LPCWSTR str) |
Assignment(=) operator overload. From a wide character string. More... | |
FX_WCHAR | operator[] (FX_STRSIZE nIndex) const |
Subscript([]) operator overload. It retrieves a wide character specified by the zero-based index in nIndex. More... | |
void | ReleaseBuffer (FX_STRSIZE len=-1) |
Release the buffer fetched by function CFX_WideString::GetBuffer or CFX_WideString::LockBuffer, and set the length of modified string. More... | |
FX_STRSIZE | Remove (FX_WCHAR ch) |
Remove all occurrence of a particular character. More... | |
FX_STRSIZE | Replace (FX_LPCWSTR lpszOld, FX_LPCWSTR lpszNew) |
Replace all patterns in the string with a new sub-string. More... | |
void | Reserve (FX_STRSIZE len) |
Reserve a buffer that can hold specific number of characters. More... | |
CFX_WideString | Right (FX_STRSIZE count) const |
Extracts the last (rightmost) count wide characters from this CFX_WideString object as a sub-string. More... | |
void | SetAt (FX_STRSIZE nIndex, FX_WCHAR ch) |
Overwrites a single wide character specified by an index number. More... | |
void | TrimLeft () |
Trim white spaces from the left side of the wide string. More... | |
void | TrimLeft (FX_LPCWSTR lpszTargets) |
Trim continuous occurrences of specified characters from left side of the wide string. More... | |
void | TrimLeft (FX_WCHAR chTarget) |
Trim continuous occurrences of specified character from left side of the wide string. More... | |
void | TrimRight () |
Trim white spaces from the right side of the wide string. More... | |
void | TrimRight (FX_LPCWSTR lpszTargets) |
Trim continuous occurrences of specified characters from right side of the wide string. More... | |
void | TrimRight (FX_WCHAR chTarget) |
Trim continuous occurrences of specified character from right side of the wide string. More... | |
CFX_ByteString | UTF16LE_Encode (FX_BOOL bTerminate=true) const |
Do UTF16LE encoding. More... | |
CFX_ByteString | UTF8Encode () const |
Do UTF8 encoding. More... | |
Static Public Member Functions | |
static CFX_WideString | FromLocal (const char *str, FX_STRSIZE len=-1) |
Create a wide string from system multi-byte charset. More... | |
static CFX_WideString | FromUTF16BE (const unsigned short *str, FX_STRSIZE len=-1) |
Create a wide string from UTF16BE encoded string. More... | |
static CFX_WideString | FromUTF16LE (const unsigned short *str, FX_STRSIZE len=-1) |
Create a wide string from UTF16LE encoded string. More... | |
static CFX_WideString | FromUTF8 (const char *str, FX_STRSIZE len=-1) |
Create a wide string from UTF-8 string (ASCII string compatible). More... | |
static FX_STRSIZE | WStringLength (const unsigned short *str) |
Length of string. More... | |
WIDE STRING CLASS.
On Windows platforms, a wide string is represented by UTF-16LE encoding; On Unix/Linux platforms, a wide string is represented by UCS-4 encoding.