Foxit PDF SDK
|
BYTE STRING CLASS. More...
Inherits CFX_Object.
Public Member Functions | |
CFX_ByteString () | |
Construct a null byte string. | |
CFX_ByteString (char ch) | |
Construct from a single character. More... | |
CFX_ByteString (const CFX_ByteString &str) | |
Copy constructor. More... | |
CFX_ByteString (FX_BSTR bstrc) | |
Construct from a constant ref to a CFX_ByteStringC object. More... | |
CFX_ByteString (FX_BSTR bstrc1, FX_BSTR bstrc2) | |
Concatenate constructor. More... | |
CFX_ByteString (FX_LPCBYTE ptr, FX_STRSIZE len) | |
Construct from a byte string. More... | |
CFX_ByteString (FX_LPCSTR ptr, FX_STRSIZE len=-1) | |
Construct from a character string. More... | |
~CFX_ByteString () | |
int | Compare (FX_BSTR str) const |
Compare the the string with another. Case-sensitive. More... | |
void | ConvertFrom (const CFX_WideString &str, CFX_CharMap *pCharMap=NULL) |
Load unicode data into this byte string, using specified character mapper. If no character mapper specified, the system default mapper will be used. More... | |
FX_STRSIZE | Delete (FX_STRSIZE index, FX_STRSIZE count=1) |
Delete one or more characters starting from specific position. More... | |
void | Empty () |
Set this string to be empty. More... | |
bool | Equal (FX_BSTR str) const |
Check if current string is equal to another one. Case-sensitive. More... | |
bool | EqualNoCase (FX_BSTR str) const |
Check if current string is equal to another one, not considering case. More... | |
FX_STRSIZE | Find (FX_BSTR lpszSub, FX_STRSIZE start=0) const |
Find a sub-string, from specific position. Only first occurrence is found. More... | |
FX_STRSIZE | Find (FX_CHAR ch, FX_STRSIZE start=0) const |
Find a character, from specific position. Only first occurrence is found. More... | |
void | Format (FX_LPCSTR lpszFormat,...) |
Format a number of parameters into this byte string. More... | |
void | FormatV (FX_LPCSTR lpszFormat, va_list argList) |
Format a number of parameters into this byte string, using va_list. More... | |
FX_BYTE | GetAt (FX_STRSIZE nIndex) const |
Get a single byte specified by an index number. More... | |
FX_LPSTR | GetBuffer (FX_STRSIZE len) |
Get a buffer with specific number of bytes allocated. More... | |
FX_DWORD | GetID (FX_STRSIZE start_pos=0) const |
Get a DWORD identifier of the string. See function CFX_ByteStringC::GetID for details. More... | |
FX_STRSIZE | GetLength () const |
Get number of bytes in the byte string (not counting any possible terminator). More... | |
FX_STRSIZE | Insert (FX_STRSIZE index, FX_CHAR ch) |
Insert a character before specific position. More... | |
bool | IsEmpty () const |
Check whether current string object is empty. More... | |
CFX_ByteString | Left (FX_STRSIZE count) const |
Extracts the first (leftmost) count bytes from this CFX_ByteString object as a sub-string. More... | |
void | Load (FX_LPCBYTE str, FX_STRSIZE len) |
Load from a byte string. More... | |
FX_LPSTR | LockBuffer () |
Lock and get the current string buffer, so the caller can modify the returned buffer. More... | |
void | MakeLower () |
Change case of English letters to lower. More... | |
void | MakeUpper () |
Change case of English letters to upper. More... | |
CFX_ByteString | Mid (FX_STRSIZE first) const |
Extracts a substring from this CFX_ByteString object, starting at position nFirst (zero-based) to last. More... | |
CFX_ByteString | Mid (FX_STRSIZE first, FX_STRSIZE count) const |
Extracts a substring of count bytes from this CFX_ByteString object, starting at position nFirst (zero-based) to last. More... | |
operator FX_LPCBYTE () const | |
FX_LPCBYTE type conversion operator. CFX_ByteString can be used in places where FX_LPCSTR or FX_LPCBYTE is needed. | |
operator FX_LPCSTR () const | |
FX_LPCSTR type conversion operator. CFX_ByteString can be used in places where FX_LPCSTR or FX_LPCBYTE is needed. | |
bool | operator!= (const CFX_ByteString &str) const |
Comparison(!=) operator overload. case-sensitive. More... | |
bool | operator!= (FX_BSTR str) const |
Comparison(!=) operator overload. case-sensitive. More... | |
bool | operator!= (FX_LPCSTR str) const |
Comparison(!=) operator overload. case-sensitive. More... | |
const CFX_ByteString & | operator+= (const CFX_ByteString &str) |
Concatenation(+=) operator overload. Concatenate a CFX_ByteString object. More... | |
const CFX_ByteString & | operator+= (FX_BSTR bstrc) |
Concatenation(+=) operator overload. Concatenate a constant CFX_ByteStringC object. More... | |
const CFX_ByteString & | operator+= (FX_CHAR ch) |
Concatenation(+=) operator overload. Concatenate a single character. More... | |
const CFX_ByteString & | operator+= (FX_LPCSTR str) |
Concatenation(+=) operator overload. Concatenate a null-terminated character string. More... | |
bool | operator< (const CFX_ByteString &rhs) const |
Comparison(<) operator overload. case-sensitive. More... | |
const CFX_ByteString & | operator= (const CFX_BinaryBuf &buf) |
Assignment(=) operator overload. From a CFX_BinaryBuf object. More... | |
const CFX_ByteString & | operator= (const CFX_ByteString &stringSrc) |
Assignment(=) operator overload. From a CFX_ByteString object. More... | |
const CFX_ByteString & | operator= (FX_BSTR bstrc) |
Assignment(=) operator overload. From a constant byte string. More... | |
const CFX_ByteString & | operator= (FX_LPCSTR str) |
Assignment(=) operator overload. From a character string. More... | |
bool | operator== (const CFX_ByteString &str) const |
Comparison(==) operator overload. case-sensitive. More... | |
bool | operator== (FX_BSTR str) const |
Comparison(==) operator overload. case-sensitive. More... | |
bool | operator== (FX_LPCSTR str) const |
Comparison(==) operator overload. case-sensitive. More... | |
FX_BYTE | operator[] (FX_STRSIZE nIndex) const |
Subscript([]) operator overload. It retrieves a single byte specified by the zero-based index in nIndex. More... | |
void | ReleaseBuffer (FX_STRSIZE len=-1) |
Release the buffer fetched by function CFX_ByteString::GetBuffer or CFX_ByteString::LockBuffer, and set the length of modified string. More... | |
FX_STRSIZE | Remove (FX_CHAR ch) |
Remove all occurrence of a particular character. More... | |
FX_STRSIZE | Replace (FX_BSTR lpszOld, FX_BSTR 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 bytes. More... | |
FX_STRSIZE | ReverseFind (FX_CHAR ch) const |
Find a character from end of the string. More... | |
CFX_ByteString | Right (FX_STRSIZE count) const |
Extracts the last (rightmost) count bytes from this CFX_ByteString object as a sub-string. More... | |
void | SetAt (FX_STRSIZE nIndex, FX_CHAR ch) |
Overwrites a single byte specified by an index number. More... | |
void | TrimLeft () |
Trim white spaces from the left side of the byte string. More... | |
void | TrimLeft (FX_BSTR lpszTargets) |
Trim continuous occurrences of specified characters from left side of the byte string. More... | |
void | TrimLeft (FX_CHAR chTarget) |
Trim continuous occurrences of specified characters from left side of the byte string. More... | |
void | TrimRight () |
Trim white spaces from the right side of the byte string. More... | |
void | TrimRight (FX_BSTR lpszTargets) |
Trim continuous occurrences of specified characters from right side of the byte string. More... | |
void | TrimRight (FX_CHAR chTarget) |
Trim continuous occurrences of specified character from right side of the byte string. More... | |
CFX_WideString | UTF8Decode () const |
Decode a UTF-8 unicode string (assume this byte string is UTF-8 encoded). More... | |
Static Public Member Functions | |
static CFX_ByteString | FormatFloat (FX_FLOAT f, int precision=0) |
Convert from floating-point number. More... | |
static CFX_ByteString | FormatInteger (FX_INT32 i, FX_DWORD flags=0) |
Convert from Integer. More... | |
static CFX_ByteString | FromUnicode (const CFX_WideString &str) |
Create a CFX_ByteString object from a CFX_WideString object. More... | |
static CFX_ByteString | FromUnicode (FX_LPCWSTR ptr, FX_STRSIZE len=-1) |
Create a CFX_ByteString object from a Unicode string. Convert from Unicode to system multi-byte charset. More... | |
static CFX_ByteString | LoadFromFile (FX_BSTR file_path) |
Load the whole content of a file. More... | |
BYTE STRING CLASS.