This reference page is linked to from the following overview topics: Information and Technical Support, Your First FBX SDK Program, List of Python FBX classes.
Utility class to manipulate strings.
Common/Common.cxx, ExportDocument/main.cxx, ExportScene01/main.cxx, ExportScene02/main.cxx, ExportScene03/main.cxx, ExportScene04/main.cxx, ExportScene05/main.cxx, ImportScene/DisplayAnimation.cxx, ImportScene/DisplayCamera.cxx, ImportScene/DisplayCommon.cxx, ImportScene/DisplayGenericInfo.cxx, ImportScene/DisplayHierarchy.cxx, ImportScene/DisplayLink.cxx, ImportScene/DisplayMarker.cxx, ImportScene/DisplayMaterial.cxx, ImportScene/DisplayMesh.cxx, ImportScene/DisplayNurb.cxx, ImportScene/DisplayPose.cxx, ImportScene/DisplayUserProperties.cxx, Instances/main.cxx, Layers/main.cxx, MyOwnWriterReader/MyOwnReader.cxx, ProceduralTexture/main.cxx, StereoCamera/main.cxx, Transformations/DisplayCommon.cxx, Transformations/main.cxx, UIExamples/Common/ImportExport.cxx, UIExamples/CubeCreator/SDK_Utility.cxx, UIExamples/CubeCreator/SDK_Utility.h, UIExamples/CubeCreator/UI.cxx, UIExamples/SceneTreeView/SDK_Utility.cxx, UIExamples/SceneTreeView/SDK_Utility.h, ViewScene/GlFunctions.cxx, ViewScene/InitScene.cxx, ViewScene/main.cxx, ViewScene/SetCamera.cxx, ViewScene/Texture.cxx, and ViewScene/Texture.h.
#include <kstring.h>
Constructors and Destructor |
|
| KString () | |
| Default constructor. |
|
| KString (const KString &pStr) | |
| Copy constructor. |
|
| KString (const char *pStr) | |
| String constructor. |
|
| KString (char pChar, size_t pNbRepeat=1) | |
| Character constructor. |
|
| KString (const char *pCharPtr, size_t pLength) | |
| String constructor with maximum length.
|
|
| KString (const int pValue) | |
| Integer constructor. |
|
| KString (const float pValue) | |
| Float constructor. |
|
| KString (const double pValue) | |
| Double constructor. |
|
| ~KString () | |
| Destructor. |
|
| void | Destroy () |
| Destroy an allocated version of the string.
|
|
Buffer Access and Validation |
|
| size_t | GetLen () const |
| Get string length like "C" strlen().
|
|
| bool | IsEmpty () const |
Return true if string length
equal zero. |
|
| KString & | Empty () |
| Discard the content of the string. |
|
| char & | operator[] (int pIndex) |
| Access by reference. |
|
| char | operator[] (int pIndex) const |
| Access by copy. |
|
| char * | Buffer () |
| Non-const buffer access. |
|
| const char * | Buffer () const |
| Const buffer access. |
|
String Operations |
|
| 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 & | 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) |
| Integer append. |
|
| const KString & | operator+= (float pValue) |
| Float append. |
|
| const KString & | operator+= (double pValue) |
| Double append. |
|
| 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. |
|
| operator const char * () const | |
| Cast operator. |
|
| const KString & | Copy (const char *pStr, size_t pLength) |
| String assignment function with maximum
length. |
|
| const KString & | Append (const char *pStr, size_t pLength) |
| Append as "C" strncat(). |
|
| int | Compare (const char *pStr) const |
| Compare as "C" strcmp(). |
|
| int | CompareNoCase (const char *pStr) const |
| Compare as "C" stricmp().
|
|
| void | Swap (KString &pStr) |
| Swap the contents of two strings. |
|
| KString | Upper () const |
| Uppercase conversion. |
|
| KString | Lower () const |
| Lowercase conversion. |
|
| KFBX_DLL KString | operator+ (const KString &pKStr1, const KString &pKStr2) |
| KString
concatenation. |
|
| KFBX_DLL KString | operator+ (const KString &pKStr, char pChar) |
| Character concatenation. |
|
| KFBX_DLL KString | operator+ (const KString &pKStr, const char *pStr) |
| String concatenation. |
|
| KFBX_DLL KString | operator+ (const KString &pKStr, int pValue) |
| Integer concatenation. |
|
| KFBX_DLL KString | operator+ (const KString &pKStr, float pValue) |
| Float concatenation. |
|
| KFBX_DLL KString | operator+ (const KString &pKStr, double pValue) |
| Double concatenation. |
|
Substring Extraction |
|
| KString | Mid (size_t pFirst, size_t pCount) const |
| Extract middle string for a given length.
|
|
| KString | Mid (size_t pFirst) const |
| Extract middle string up to the end.
|
|
| KString | Left (size_t pCount) const |
| Extract left string. |
|
| KString | Right (size_t pCount) const |
| Extract right string. |
|
Padding |
|
| enum | PaddingType { eRight, eLeft, eBoth } |
|
Padding types. More... |
|
| KString | Pad (PaddingType pPadding, size_t pLen, char pCar=' ') const |
| Add padding characters. |
|
| KString | UnPad (PaddingType pPadding) const |
| Remove padding characters. |
|
Search |
|
| int | Find (char pChar, size_t pStartPosition=0) const |
| Look for a single character match, like "C"
strchr(). |
|
| int | Find (const char *pStrSub, size_t pStartPosition=0) const |
| Look for a substring match, like "C"
strstr(). |
|
| int | ReverseFind (char pChar) const |
| Look for the last occurrence of character in
string, like "C" strrchr(). |
|
| int | FindOneOf (const char *pStrCharSet, size_t pStartPosition=0) const |
| Look for a single character match, like "C"
strpbrk(). |
|
| bool | FindAndReplace (const char *pFind, const char *pReplaceBy, size_t pStartPosition=0) |
| Replace a substring. |
|
| bool | ReplaceAll (const char *pFind, const char *pReplaceBy) |
| Replace all occurrence of a substring.
|
|
| bool | ReplaceAll (char pFind, char pReplaceBy) |
| Replace all occurrence of character to find
by replacement character. |
|
Token Extraction |
|
| int | GetTokenCount (const char *pSpans) const |
| Get number of tokens. |
|
| KString | GetToken (int pTokenIndex, const char *pSpans) const |
| Get token at given index. |
|
| enum PaddingType |
Padding types.
| KString | ( | ) |
Default constructor.
| KString | ( | const char * | pStr | ) |
String constructor.
| pStr | The string used to construct KString. |
| KString | ( | char | pChar, |
| size_t | pNbRepeat =
1 |
||
| ) |
Character constructor.
| pChar | The character used to construct KString. |
| pNbRepeat | The number of times to repeat the character. Default value is 1 |
| KString | ( | const char * | pCharPtr, |
| size_t | pLength | ||
| ) |
String constructor with maximum length.
| pCharPtr | The string used to construct KString. |
| pLength | Maximum length. |
| KString | ( | const int | pValue | ) |
Integer constructor.
| pValue | The int value used to construct KString. |
| KString | ( | const float | pValue | ) |
Float constructor.
| pValue | The float value used to construct KString. |
| KString | ( | const double | pValue | ) |
Double constructor.
| pValue | The double value used to construct KString. |
| ~KString | ( | ) |
Destructor.
| void Destroy | ( | ) |
Destroy an allocated version of the string.
| size_t GetLen | ( | ) | const |
Get string length like "C" strlen().
| bool IsEmpty | ( | ) | const |
Return true if string length equal zero.
| KString& Empty | ( | ) |
Discard the content of the string.
| char& operator[] | ( | int | pIndex | ) |
Access by reference.
| pIndex | The index. |
| char operator[] | ( | int | pIndex | ) | const |
Access by copy.
| pIndex | The index. |
| char* Buffer | ( | ) |
Non-const buffer access.
| const char* Buffer | ( | ) | const |
Const buffer access.
| const KString& operator= | ( | char | pChar | ) |
Character assignment operator.
| pChar | The character to be assigned. |
| const KString& operator= | ( | const char * | pStr | ) |
String assignment operator.
| pStr | The string to be assigned. |
| const KString& operator= | ( | int | pValue | ) |
Int assignment operator.
| pValue | The int value to be assigned. |
| const KString& operator= | ( | float | pValue | ) |
Float assignment operator.
| pValue | The float value to be assigned. |
| const KString& operator= | ( | double | pValue | ) |
Double assignment operator.
| pValue | The double value to be assigned. |
| const KString& operator+= | ( | char | pChar | ) |
Character append.
| pChar | The character to be appended. |
| const KString& operator+= | ( | const char * | pStr | ) |
String append.
| pStr | The string to be appended. |
| const KString& operator+= | ( | int | pValue | ) |
Integer append.
| pValue | The int value to be appended. |
| const KString& operator+= | ( | float | pValue | ) |
Float append.
| pValue | The float value to be appended. |
| const KString& operator+= | ( | double | pValue | ) |
Double append.
| pValue | The double value to be appended. |
| bool operator== | ( | const KString & | pStr | ) | const |
Equality operator.
| pStr | The KString to be compared. |
| bool operator!= | ( | const KString & | pStr | ) | const |
Inequality operator.
| pStr | The KString to be compared. |
| bool operator< | ( | const KString & | pStr | ) | const |
Inferior to operator.
| pStr | The KString to be compared. |
| bool operator<= | ( | const KString & | pStr | ) | const |
Inferior or equal to operator.
| pStr | The KString to be compared. |
| bool operator>= | ( | const KString & | pStr | ) | const |
Superior or equal to operator.
| pStr | The KString to be compared. |
| bool operator> | ( | const KString & | pStr | ) | const |
Superior to operator.
| pStr | The KString to be compared. |
| bool operator== | ( | const char * | pStr | ) | const |
Equality operator.
| pStr | The string to be compared. |
| bool operator!= | ( | const char * | pStr | ) | const |
Inequality operator.
| pStr | The string to be compared. |
| bool operator< | ( | const char * | pStr | ) | const |
Inferior to operator.
| pStr | The string to be compared. |
| bool operator<= | ( | const char * | pStr | ) | const |
Inferior or equal to operator.
| pStr | The string to be compared. |
| bool operator>= | ( | const char * | pStr | ) | const |
Superior or equal to operator.
| pStr | The string to be compared. |
| bool operator> | ( | const char * | pStr | ) | const |
Superior to operator.
| pStr | The string to be compared. |
| operator const char * | ( | ) | const |
Cast operator.
| const KString& Copy | ( | const char * | pStr, |
| size_t | pLength | ||
| ) |
String assignment function with maximum length.
| pStr | The string to be assigned. |
| pLength | The maximum length of string to be assigned. |
| const KString& Append | ( | const char * | pStr, |
| size_t | pLength | ||
| ) |
Append as "C" strncat().
| pStr | The string to be appended. |
| pLength | The length of chars to be appended. |
| int Compare | ( | const char * | pStr | ) | const |
Compare as "C" strcmp().
| pStr | The string to be compared. |
| int CompareNoCase | ( | const char * | pStr | ) | const |
| void Swap | ( | KString & | pStr | ) |
Swap the contents of two strings.
| pStr | The KString to be swapped. |
| KString Upper | ( | ) | const |
| KString Lower | ( | ) | const |
Lowercase conversion.
| KString Mid | ( | size_t | pFirst, |
| size_t | pCount | ||
| ) | const |
Extract middle string for a given length.
| pFirst | The start index of KString to be extracted. |
| pCount | The length of sub-string to be extracted. |
| KString Mid | ( | size_t | pFirst | ) | const |
Extract middle string up to the end.
| pFirst | The start index of KString to be extracted. |
| KString Left | ( | size_t | pCount | ) | const |
Extract left string.
| pCount | The length of sub-string to be extracted. |
| KString Right | ( | size_t | pCount | ) | const |
Extract right string.
| pCount | The length of sub-string to be extracted. |
| KString Pad | ( | PaddingType | pPadding, |
| size_t | pLen, | ||
| char | pCar =
' ' |
||
| ) | const |
Add padding characters.
| pPadding | The padding type. |
| pLen | The length limit of KString after padding. |
| pCar | The character to be padded. |
| KString UnPad | ( | PaddingType | pPadding | ) | const |
| int Find | ( | char | pChar, |
| size_t | pStartPosition =
0 |
||
| ) | const |
Look for a single character match, like "C" strchr().
| pChar | The character to look for. |
| pStartPosition | Start position to look for. |
| int Find | ( | const char * | pStrSub, |
| size_t | pStartPosition =
0 |
||
| ) | const |
Look for a substring match, like "C" strstr().
| pStrSub | The substring to look for. |
| pStartPosition | Start position to look for. |
| int ReverseFind | ( | char | pChar | ) | const |
Look for the last occurrence of character in string, like "C" strrchr().
| pChar | The character to look for. |
| int FindOneOf | ( | const char * | pStrCharSet, |
| size_t | pStartPosition =
0 |
||
| ) | const |
Look for a single character match, like "C" strpbrk().
| pStrCharSet | The character set. |
| pStartPosition | The start position. |
| bool FindAndReplace | ( | const char * | pFind, |
| const char * | pReplaceBy, | ||
| size_t | pStartPosition =
0 |
||
| ) |
Replace a substring.
| pFind | The substring to look for. |
| pReplaceBy | The string to replace by. |
| pStartPosition | The start position. |
true if substring found and replaced.| bool ReplaceAll | ( | const char * | pFind, |
| const char * | pReplaceBy | ||
| ) |
Replace all occurrence of a substring.
| pFind | The substring to look for. |
| pReplaceBy | The string to replace by. |
true if something got replaced.| bool ReplaceAll | ( | char | pFind, |
| char | pReplaceBy | ||
| ) |
Replace all occurrence of character to find by replacement character.
| pFind | The character to look for. |
| pReplaceBy | The character to replace by. |
true if character found and replaced.| int GetTokenCount | ( | const char * | pSpans | ) | const |
Get number of tokens.
| pSpans | The span |
| KString GetToken | ( | int | pTokenIndex, |
| const char * | pSpans | ||
| ) | const |
Get token at given index.
| pTokenIndex | The token index. |
| pSpans | The span |