kstring.h File Reference

#include <fbxfilesdk/fbxfilesdk_def.h>
#include <fbxfilesdk/components/kbaselib/klib/kdebug.h>
#include <fbxfilesdk/fbxfilesdk_nsbegin.h>
#include <fbxfilesdk/fbxfilesdk_nsend.h>

Go to the source code of this file.

Classes

class   KString
  Utility class to manipulate strings. More...
class   KStringCompare
  Functor class to compare KString, and is suitable for use in KMap. More...
class   KCharCompare
  Functor class to compare "C" strings. More...

Defines

#define  KFBX_KSTRING_OPAQUE_OBJECT_HEADER   void* mOpaqueChunk[SIZE_OF_STDSTRING/sizeof(void*)]
#define  KFBX_KSTRING_OPAQUE_OBJECT   KFBX_KSTRING_OPAQUE_OBJECT_HEADER

Functions

KFBX_DLL void  KFbxUTF8ToWidechar (const char *pInUTF8, wchar_t *&pOutWideChar)
  Convert string from UTF8 to wide-char.
KFBX_DLL void  KFbxWideCharToUTF8 (const wchar_t *pInWideChar, char *&pOutUTF8)
  Convert string from wide-char to UTF8.
  KFBX_INCOMPATIBLE_WITH_KARRAYTEMPLATE (KString)
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.
void  RemoveChar (KString &pString, char lToRemove)
  Remove the given char in the given string.

Detailed Description

Definition in file kstring.h.


Define Documentation

#define KFBX_KSTRING_OPAQUE_OBJECT_HEADER   void* mOpaqueChunk[SIZE_OF_STDSTRING/sizeof(void*)]

Definition at line 63 of file kstring.h.

#define KFBX_KSTRING_OPAQUE_OBJECT   KFBX_KSTRING_OPAQUE_OBJECT_HEADER

Definition at line 65 of file kstring.h.


Function Documentation

KFBX_DLL void KFbxUTF8ToWidechar ( const char *  pInUTF8,
wchar_t *&  pOutWideChar 
)

Convert string from UTF8 to wide-char.

Parameters:
inUTF8 input string
pOutWideChar output string
Remarks:
Output buffer should be release by caller
KFBX_DLL void KFbxWideCharToUTF8 ( const wchar_t *  pInWideChar,
char *&  pOutUTF8 
)

Convert string from wide-char to UTF8.

Parameters:
inWideChar input string
pOutUTF8 output string
Remarks:
Output buffer should be release by caller
KFBX_INCOMPATIBLE_WITH_KARRAYTEMPLATE ( KString  )
KFBX_DLL KString operator+ ( const KString pKStr1,
const KString pKStr2 
)

KString concatenation.

Parameters:
pKStr1 KString 1 to be concatenated to KString 2.
pKStr2 KString 2 to be concatenated to KString 1
KFBX_DLL KString operator+ ( const KString pKStr,
char  pChar 
)

Character concatenation.

Parameters:
pKStr KString to be concatenated to Character.
pChar Character to be concatenated to KString
KFBX_DLL KString operator+ ( const KString pKStr,
const char *  pStr 
)

String concatenation.

Parameters:
pKStr KString to be concatenated to String.
pStr String to be concatenated to KString
KFBX_DLL KString operator+ ( const KString pKStr,
int  pValue 
)

Integer concatenation.

Parameters:
pKStr KString to be concatenated to Integer.
pValue Integer to be concatenated to KString
KFBX_DLL KString operator+ ( const KString pKStr,
float  pValue 
)

Float concatenation.

Parameters:
pKStr KString to be concatenated to Float.
pValue Float to be concatenated to KString
KFBX_DLL KString operator+ ( const KString pKStr,
double  pValue 
)

Double concatenation.

Parameters:
pKStr KString to be concatenated to Double.
pValue Double to be concatenated to KString
void RemoveChar ( KString pString,
char  lToRemove 
) [inline]

Remove the given char in the given string.

Parameters:
pString The given string.
lToRemove The given char ought to be removed.
Remarks:
Strings used in this function are case-sensitive.

Definition at line 587 of file kstring.h.

{
    int lPos = pString.ReverseFind(lToRemove);
    while( lPos >= 0 )
    {
        pString = pString.Left(lPos) + pString.Mid(lPos + 1);
        lPos = pString.ReverseFind(lToRemove);
    }
}