#include <kstring.h>
Definition at line 87 of file kstring.h.
Padding | |
| enum | PaddingType |
| Padding types. More... | |
| KString | Pad (PaddingType pPadding, int pLen, char pCar= ' ') const |
| Add padding characters. | |
| KString | UnPad (PaddingType pPadding) const |
| Remove padding characters. | |
Constructors and Destructor | |
| static KString * | Create () |
| Create an instance. | |
| static KString * | Create (KString *pString) |
| Create an instance if not already allocated ( is null ). | |
| static KString * | DestroyIfEmpty (KString *pString) |
| Destroy the allocated space if empty. | |
| static KString * | StringOrEmpty (KString *pString) |
| Destroy the allocated space if empty. | |
| void | Destroy () |
| Destroy an allocated version of the string. | |
Constructors and Destructor | |
| KString () | |
| Default constructor. | |
| KString (const KString &pStr) | |
| Copy constructor. | |
| KString (const char *pStr) | |
| String constructor. | |
| KString (char pChar, int pNbRepeat=1) | |
| Character constructor. | |
| KString (const char *pCharPtr, int pLength) | |
| String constructor with maximum length. | |
| KString (const int pValue) | |
| Int constructor. | |
| KString (const float pValue) | |
| Float constructor. | |
| KString (const double pValue) | |
| Double constructor. | |
| ~KString () | |
| Destructor. | |
Instance Validation. | |
| bool | IsOK () const |
Return true if string is valid. | |
| KString & | Invalidate () |
| Invalidate string. | |
| int | GetLen () const |
| Get string length like "C" strlen(). | |
| bool | IsEmpty () const |
Return true if string is of length 0. | |
| KString & | Empty () |
| Discard the content of the object. | |
Buffer Access | |
| char & | operator[] (int pIndex) |
| Access by reference. | |
| char | operator[] (int pIndex) const |
| Access by copy. | |
| operator const char * () const | |
| Cast operator. | |
| char * | ToChars () const |
| Uniform non-UNICODE support. | |
| char * | Buffer () |
| Non-const buffer access. | |
| char * | GetBuffer () |
| Non-const buffer access, same as Buffer(). | |
Assignement Operators | |
| const KString & | operator= (const KString &pStr) |
| KString assignment operator. | |
| const KString & | operator= (char pChar) |
| Character assignment operator. | |
| const KString & | operator= (const char *pStr) |
| String assignment operator. | |
| const KString & | operator= (int pValue) |
| Int assignment operator. | |
| const KString & | operator= (float pValue) |
| Float assignment operator. | |
| const KString & | operator= (double pValue) |
| Double assignment operator. | |
| const KString & | Copy (int pLen, const char *pStr) |
| String assignment function. | |
Append and Concatenation | |
| const KString & | Append (const char *pStr) |
| Append as "C" strcat(). | |
| const KString & | AppendN (const char *pStr, int pLength) |
| Append as "C" strncat(). | |
| const KString & | operator+= (const KString &pKStr) |
| KString append. | |
| const KString & | operator+= (char pChar) |
| Character append. | |
| const KString & | operator+= (const char *pStr) |
| String append. | |
| const KString & | operator+= (int pValue) |
| Int append. | |
| const KString & | operator+= (float pValue) |
| Float append. | |
| KBASELIB_DLL KString | operator+ (const KString &pKStr1, const KString &pKStr2) |
| KString concatenation. | |
| KBASELIB_DLL KString | operator+ (const KString &pKStr, char pChar) |
| Character concatenation. | |
| KBASELIB_DLL KString | operator+ (const KString &pKStr, const char *pStr) |
| String concatenation. | |
| KBASELIB_DLL KString | operator+ (const KString &pKStr, int pValue) |
| Int concatenation. | |
| KBASELIB_DLL KString | operator+ (const KString &pKStr, float pValue) |
| Float concatenation. | |
String Comparison | |
| int | Compare (const char *pStr) const |
| Compare as "C" strcmp(). | |
| int | CompareNoCase (const char *pStr) const |
| Compare as "C" stricmp(). | |
| bool | operator== (const KString &pStr) const |
| Equality operator. | |
| bool | operator!= (const KString &pStr) const |
| Inequality operator. | |
| bool | operator< (const KString &pStr) const |
| Inferior to operator. | |
| bool | operator<= (const KString &pStr) const |
| Inferior or equal to operator. | |
| bool | operator>= (const KString &pStr) const |
| Superior or equal to operator. | |
| bool | operator> (const KString &pStr) const |
| Superior to operator. | |
| bool | operator== (const char *pStr) const |
| Equality operator. | |
| bool | operator!= (const char *pStr) const |
| Inequality operator. | |
| bool | operator< (const char *pStr) const |
| Inferior to operator. | |
| bool | operator<= (const char *pStr) const |
| Inferior or equal to operator. | |
| bool | operator>= (const char *pStr) const |
| Superior or equal to operator. | |
| bool | operator> (const char *pStr) const |
| Superior to operator. | |
Substring Extraction | |
| KString | Mid (int pFirst, int pCount) const |
| Extract middle string for a given length. | |
| KString | Mid (int pFirst) const |
| Extract middle string up to the end. | |
| KString | Left (int pCount) const |
| Extract left string. | |
| KString | Right (int pCount) const |
| Extract right string. | |
Conversion | |
| KString | Upper () const |
| Uppercase conversion. | |
| KString | Lower () const |
| Lowercase conversion. | |
| KString | Reverse () const |
| Reverse conversion. | |
| KString | ConvertToUnix () const |
| Convert to Unix, changes \r\n characters for a single \n. | |
| KString | ConvertToWindows () const |
| Convert to Windows, changes \n character for both \r\n. | |
Search | |
| int | Find (char pChar, int pStartPosition=0) const |
| Look for a single character match, like "C" strchr(). | |
| int | Find (const char *pStrSub, int pStartPosition=0) const |
| Look for a substring match, like "C" strstr(). | |
| int | ReverseFind (char pChar) const |
| Look for a single character match, like "C" strrchr(). | |
| int | FindOneOf (const char *pStrCharSet, int pStartPosition=0) const |
| Look for a single character match, like "C" strpbrk(). | |
| bool | FindAndReplace (const char *pFind, const char *pReplaceBy, int pStartPosition=0) |
| Replace a substring. | |
Token Extraction | |
| int | GetTokenCount (const char *pSpans) |
| Get number of tokens. | |
| KString | GetToken (int pTokenIndex, const char *pSpans) |
| Get token at given index. | |
| enum PaddingType |
| KString | ( | ) |
Default constructor.
| KString | ( | const char * | pStr | ) |
String constructor.
| KString | ( | char | pChar, | |
| int | pNbRepeat = 1 | |||
| ) |
Character constructor.
| KString | ( | const char * | pCharPtr, | |
| int | pLength | |||
| ) |
String constructor with maximum length.
| KString | ( | const int | pValue | ) |
Int constructor.
| KString | ( | const float | pValue | ) |
Float constructor.
| KString | ( | const double | pValue | ) |
Double constructor.
| ~KString | ( | ) |
Destructor.
| static KString* Create | ( | ) | [static] |
Create an instance.
Create an instance if not already allocated ( is null ).
| void Destroy | ( | ) |
Destroy an allocated version of the string.
| bool IsOK | ( | ) | const |
Return true if string is valid.
| KString& Invalidate | ( | ) |
Invalidate string.
| int GetLen | ( | ) | const |
| bool IsEmpty | ( | ) | const |
Return true if string is of length 0.
| KString& Empty | ( | ) |
Discard the content of the object.
| char& operator[] | ( | int | pIndex | ) |
Access by reference.
| char operator[] | ( | int | pIndex | ) | const |
Access by copy.
| operator const char * | ( | ) | const |
Cast operator.
| char* ToChars | ( | ) | const |
Uniform non-UNICODE support.
| char* Buffer | ( | ) |
Non-const buffer access.
Referenced by KFbxDataStream::FieldWriteS(), and KStringListTemplate< KStringListItem >::SetText().
| char* GetBuffer | ( | ) |
Non-const buffer access, same as Buffer().
| const KString& operator= | ( | char | pChar | ) |
Character assignment operator.
| const KString& operator= | ( | const char * | pStr | ) |
String assignment operator.
| const KString& operator= | ( | int | pValue | ) |
Int assignment operator.
| const KString& operator= | ( | float | pValue | ) |
Float assignment operator.
| const KString& operator= | ( | double | pValue | ) |
Double assignment operator.
| const KString& Copy | ( | int | pLen, | |
| const char * | pStr | |||
| ) |
String assignment function.
| const KString& Append | ( | const char * | pStr | ) |
Append as "C" strcat().
| const KString& AppendN | ( | const char * | pStr, | |
| int | pLength | |||
| ) |
Append as "C" strncat().
| const KString& operator+= | ( | char | pChar | ) |
Character append.
| const KString& operator+= | ( | const char * | pStr | ) |
String append.
| const KString& operator+= | ( | int | pValue | ) |
Int append.
| const KString& operator+= | ( | float | pValue | ) |
Float append.
| int Compare | ( | const char * | pStr | ) | const |
Compare as "C" strcmp().
| int CompareNoCase | ( | const char * | pStr | ) | const |
Compare as "C" stricmp().
| bool operator== | ( | const KString & | pStr | ) | const |
Equality operator.
| bool operator!= | ( | const KString & | pStr | ) | const |
Inequality operator.
| bool operator< | ( | const KString & | pStr | ) | const |
Inferior to operator.
| bool operator<= | ( | const KString & | pStr | ) | const |
Inferior or equal to operator.
| bool operator>= | ( | const KString & | pStr | ) | const |
Superior or equal to operator.
| bool operator> | ( | const KString & | pStr | ) | const |
Superior to operator.
| bool operator== | ( | const char * | pStr | ) | const |
Equality operator.
| bool operator!= | ( | const char * | pStr | ) | const |
Inequality operator.
| bool operator< | ( | const char * | pStr | ) | const |
Inferior to operator.
| bool operator<= | ( | const char * | pStr | ) | const |
Inferior or equal to operator.
| bool operator>= | ( | const char * | pStr | ) | const |
Superior or equal to operator.
| bool operator> | ( | const char * | pStr | ) | const |
Superior to operator.
| KString Mid | ( | int | pFirst, | |
| int | pCount | |||
| ) | const |
| KString Mid | ( | int | pFirst | ) | const |
Extract middle string up to the end.
| KString Left | ( | int | pCount | ) | const |
| KString Right | ( | int | pCount | ) | const |
Extract right string.
| KString Pad | ( | PaddingType | pPadding, | |
| int | pLen, | |||
| char | pCar = ' ' | |||
| ) | const |
Add padding characters.
| KString UnPad | ( | PaddingType | pPadding | ) | const |
Remove padding characters.
| KString Upper | ( | ) | const |
Uppercase conversion.
| KString Lower | ( | ) | const |
Lowercase conversion.
| KString Reverse | ( | ) | const |
Reverse conversion.
| KString ConvertToUnix | ( | ) | const |
Convert to Unix, changes \r\n characters for a single \n.
| KString ConvertToWindows | ( | ) | const |
Convert to Windows, changes \n character for both \r\n.
| int Find | ( | char | pChar, | |
| int | pStartPosition = 0 | |||
| ) | const |
Look for a single character match, like "C" strchr().
| int Find | ( | const char * | pStrSub, | |
| int | pStartPosition = 0 | |||
| ) | const |
Look for a substring match, like "C" strstr().
| int ReverseFind | ( | char | pChar | ) | const |
Look for a single character match, like "C" strrchr().
Referenced by RemoveChar().
| int FindOneOf | ( | const char * | pStrCharSet, | |
| int | pStartPosition = 0 | |||
| ) | const |
Look for a single character match, like "C" strpbrk().
| bool FindAndReplace | ( | const char * | pFind, | |
| const char * | pReplaceBy, | |||
| int | pStartPosition = 0 | |||
| ) |
Replace a substring.
true if substring found and replaced. | int GetTokenCount | ( | const char * | pSpans | ) |
Get number of tokens.
| KString GetToken | ( | int | pTokenIndex, | |
| const char * | pSpans | |||
| ) |
Get token at given index.
KString concatenation.
Character concatenation.
String concatenation.
Float concatenation.