Defines | Functions | Variables

OrxString

Defines

#define orxSTRING_KC_VECTOR_END   ')'
#define orxSTRING_KC_VECTOR_END_ALT   '}'
#define orxSTRING_KC_VECTOR_SEPARATOR   ','
#define orxSTRING_KC_VECTOR_START   '('
#define orxSTRING_KC_VECTOR_START_ALT   '{'

Functions

static orxINLINE orxS32 orxString_Compare (const orxSTRING _zString1, const orxSTRING _zString2)
static orxINLINE orxU32 orxString_ContinueCRC (const orxSTRING _zString, orxU32 _u32CRC)
static orxINLINE orxSTRING orxString_Copy (orxSTRING _zDstString, const orxSTRING _zSrcString)
static orxINLINE orxSTATUS orxString_Delete (orxSTRING _zString)
static orxINLINE orxSTRING orxString_Duplicate (const orxSTRING _zSrcString)
static orxINLINE orxU32 orxString_GetCharacterCounter (const orxSTRING _zString)
static orxU32 orxFASTCALL orxString_GetFirstCharacterCodePoint (const orxSTRING _zString, const orxSTRING *_pzRemaining)
static orxINLINE orxU32 orxString_GetLength (const orxSTRING _zString)
static orxINLINE orxBOOL orxString_GetUTF8CharacterLength (orxU32 _u32CharacterCodePoint)
static orxINLINE orxS32 orxString_ICompare (const orxSTRING _zString1, const orxSTRING _zString2)
static orxINLINE orxBOOL orxString_IsCharacterASCII (orxU32 _u32CharacterCodePoint)
static orxINLINE orxSTRING orxString_LowerCase (orxSTRING _zString)
static orxINLINE orxS32 orxString_NCompare (const orxSTRING _zString1, const orxSTRING _zString2, orxU32 _u32CharNumber)
static orxINLINE orxU32 orxString_NContinueCRC (const orxSTRING _zString, orxU32 _u32CRC, orxU32 _u32CharNumber)
static orxINLINE orxSTRING orxString_NCopy (orxSTRING _zDstString, const orxSTRING _zSrcString, orxU32 _u32CharNumber)
static orxINLINE orxS32 orxString_NICompare (const orxSTRING _zString1, const orxSTRING _zString2, orxU32 _u32CharNumber)
static orxINLINE orxS32 orxCDECL orxString_NPrint (orxSTRING _zDstString, orxU32 _u32CharNumber, const orxSTRING _zSrcString,...)
static orxINLINE orxU32 orxString_NToCRC (const orxSTRING _zString, orxU32 _u32CharNumber)
static orxINLINE orxS32 orxCDECL orxString_Print (orxSTRING _zDstString, const orxSTRING _zSrcString,...)
static orxU32 orxFASTCALL orxString_PrintUTF8Character (orxSTRING _zDstString, orxU32 _u32Size, orxU32 _u32CharacterCodePoint)
static orxINLINE const orxSTRING orxString_SearchChar (const orxSTRING _zString, orxCHAR _cChar)
static orxINLINE orxS32 orxString_SearchCharIndex (const orxSTRING _zString, orxCHAR _cChar, orxU32 _u32Position)
static orxINLINE const orxSTRING orxString_SearchString (const orxSTRING _zString1, const orxSTRING _zString2)
static orxINLINE const orxSTRING orxString_SkipPath (const orxSTRING _zString)
static orxINLINE const orxSTRING orxString_SkipWhiteSpaces (const orxSTRING _zString)
static orxINLINE orxSTATUS orxString_ToBool (const orxSTRING _zString, orxBOOL *_pbOutValue, const orxSTRING *_pzRemaining)
static orxINLINE orxU32 orxString_ToCRC (const orxSTRING _zString)
static orxINLINE orxSTATUS orxString_ToFloat (const orxSTRING _zString, orxFLOAT *_pfOutValue, const orxSTRING *_pzRemaining)
static orxINLINE orxSTATUS orxString_ToS32 (const orxSTRING _zString, orxS32 *_ps32OutValue, const orxSTRING *_pzRemaining)
static orxINLINE orxSTATUS orxString_ToS32Base (const orxSTRING _zString, orxU32 _u32Base, orxS32 *_ps32OutValue, const orxSTRING *_pzRemaining)
static orxINLINE orxSTATUS orxString_ToU32 (const orxSTRING _zString, orxU32 *_pu32OutValue, const orxSTRING *_pzRemaining)
static orxINLINE orxSTATUS orxString_ToU32Base (const orxSTRING _zString, orxU32 _u32Base, orxU32 *_pu32OutValue, const orxSTRING *_pzRemaining)
static orxINLINE orxSTATUS orxString_ToVector (const orxSTRING _zString, orxVECTOR *_pvOutValue, const orxSTRING *_pzRemaining)
static orxINLINE orxSTRING orxString_UpperCase (orxSTRING _zString)

Variables

orxDLLAPI const orxU32 sau32CRCTable [256]

Detailed Description

String module Module that handles strings


Define Documentation

#define orxSTRING_KC_VECTOR_END   ')'

Definition at line 69 of file orxString.h.

#define orxSTRING_KC_VECTOR_END_ALT   '}'

Definition at line 70 of file orxString.h.

#define orxSTRING_KC_VECTOR_SEPARATOR   ','

Definition at line 68 of file orxString.h.

#define orxSTRING_KC_VECTOR_START   '('

Definition at line 66 of file orxString.h.

#define orxSTRING_KC_VECTOR_START_ALT   '{'

Definition at line 67 of file orxString.h.


Function Documentation

static orxINLINE orxS32 orxString_Compare ( const orxSTRING  _zString1,
const orxSTRING  _zString2 
) [static]

Compare two strings, case sensitive. If the first one is smaller than the second, it returns -1, If the second one is bigger than the first, and 0 if they are equals

Parameters:
[in]_zString1First String to compare
[in]_zString2Second string to compare
Returns:
-1, 0 or 1 as indicated in the description.

Definition at line 646 of file orxString.h.

static orxINLINE orxU32 orxString_ContinueCRC ( const orxSTRING  _zString,
orxU32  _u32CRC 
) [static]

Continues a CRC with a string one

Parameters:
[in]_zStringString used to continue the given CRC
[in]_u32CRCBase CRC.
Returns:
The resulting CRC.

Definition at line 84 of file orxString.h.

static orxINLINE orxSTRING orxString_Copy ( orxSTRING  _zDstString,
const orxSTRING  _zSrcString 
) [static]

Copies a string.

Parameters:
[in]_zDstStringDestination string
[in]_zSrcStringSource string
Returns:
Copied string.

Definition at line 585 of file orxString.h.

static orxINLINE orxSTATUS orxString_Delete ( orxSTRING  _zString ) [static]

Deletes a string

Parameters:
[in]_zStringString to delete

Definition at line 627 of file orxString.h.

static orxINLINE orxSTRING orxString_Duplicate ( const orxSTRING  _zSrcString ) [static]

Duplicate a string.

Parameters:
[in]_zSrcStringString to duplicate.
Returns:
Duplicated string.

Definition at line 599 of file orxString.h.

static orxINLINE orxU32 orxString_GetCharacterCounter ( const orxSTRING  _zString ) [static]

Returns the number of valid unicode characters (UTF-8) in the string (for ASCII string, it will be the same result as orxString_GetLength())

Parameters:
[in]_zStringConcerned string
Returns:
Number of valid unicode characters contained in the string, orxU32_UNDEFINED for an invalid UTF-8 string

Definition at line 536 of file orxString.h.

static orxU32 orxFASTCALL orxString_GetFirstCharacterCodePoint ( const orxSTRING  _zString,
const orxSTRING *  _pzRemaining 
) [static]

Returns the code of the first character of the UTF-8 string

Parameters:
[in]_zStringConcerned string
[out]_pzRemainingIf non null, will contain the remaining string after the first UTF-8 character
Returns:
Code of the first UTF-8 character of the string, orxU32_UNDEFINED if it's an invalid character

Definition at line 369 of file orxString.h.

static orxINLINE orxU32 orxString_GetLength ( const orxSTRING  _zString ) [static]

Returns the number of orxCHAR in the string (for non-ASCII UTF-8 string, it won't be the actual number of unicode characters)

Parameters:
[in]_zStringString used for length computation
Returns:
Length of the string (doesn't count final orxCHAR_NULL)

Definition at line 213 of file orxString.h.

static orxINLINE orxBOOL orxString_GetUTF8CharacterLength ( orxU32  _u32CharacterCodePoint ) [static]

Gets the UTF-8 encoding length of given character

Parameters:
[in]_u32CharacterCodePointConcerned character code
Returns:
Encoding length in UTF-8 for given character if valid, orxU32_UNDEFINED otherwise

Definition at line 235 of file orxString.h.

static orxINLINE orxS32 orxString_ICompare ( const orxSTRING  _zString1,
const orxSTRING  _zString2 
) [static]

Compare two strings, case insensitive. If the first one is smaller than the second, it returns -1, If the second one is bigger than the first, and 0 if they are equals

Parameters:
[in]_zString1First String to compare
[in]_zString2Second string to compare
Returns:
-1, 0 or 1 as indicated in the description.

Definition at line 680 of file orxString.h.

static orxINLINE orxBOOL orxString_IsCharacterASCII ( orxU32  _u32CharacterCodePoint ) [static]

Tells if a character is ASCII from its ID

Parameters:
[in]_u32CharacterCodePointConcerned character code
Returns:
orxTRUE is it's a non-extended ASCII character, orxFALSE otherwise

Definition at line 226 of file orxString.h.

static orxINLINE orxSTRING orxString_LowerCase ( orxSTRING  _zString ) [static]

Lowercase a string

Parameters:
[in]_zStringString To convert
Returns:
The converted string.

Definition at line 1141 of file orxString.h.

static orxINLINE orxS32 orxString_NCompare ( const orxSTRING  _zString1,
const orxSTRING  _zString2,
orxU32  _u32CharNumber 
) [static]

Compare N first character from two strings, case sensitive. If the first one is smaller than the second, it returns -1, If the second one is bigger than the first, and 0 if they are equals.

Parameters:
[in]_zString1First String to compare
[in]_zString2Second string to compare
[in]_u32CharNumberNumber of character to compare
Returns:
-1, 0 or 1 as indicated in the description.

Definition at line 664 of file orxString.h.

static orxINLINE orxU32 orxString_NContinueCRC ( const orxSTRING  _zString,
orxU32  _u32CRC,
orxU32  _u32CharNumber 
) [static]

Continues a CRC with a string one

Parameters:
[in]_zStringString used to continue the given CRC
[in]_u32CRCBase CRC.
[in]_u32CharNumberNumber of character to process
Returns:
The resulting CRC.

Definition at line 112 of file orxString.h.

static orxINLINE orxSTRING orxString_NCopy ( orxSTRING  _zDstString,
const orxSTRING  _zSrcString,
orxU32  _u32CharNumber 
) [static]

Copies N characters from a string

Parameters:
[in]_zDstStringDestination string
[in]_zSrcStringSource string
[in]_u32CharNumberNumber of characters to copy
Returns:
Copied string

Definition at line 570 of file orxString.h.

static orxINLINE orxS32 orxString_NICompare ( const orxSTRING  _zString1,
const orxSTRING  _zString2,
orxU32  _u32CharNumber 
) [static]

Compare N first character from two strings, case insensitive. If the first one is smaller than the second, it returns -1, If the second one is bigger than the first, and 0 if they are equals.

Parameters:
[in]_zString1First String to compare
[in]_zString2Second string to compare
[in]_u32CharNumberNumber of character to compare
Returns:
-1, 0 or 1 as indicated in the description.

Definition at line 707 of file orxString.h.

static orxINLINE orxS32 orxCDECL orxString_NPrint ( orxSTRING  _zDstString,
orxU32  _u32CharNumber,
const orxSTRING  _zSrcString,
  ... 
) [static]

Prints a formated string to a memory buffer using a max size

Parameters:
[out]_zDstStringDestination string
[in]_zSrcStringSource formated string
[in]_u32CharNumberMax number of character to print
Returns:
The number of written characters

Definition at line 1305 of file orxString.h.

static orxINLINE orxU32 orxString_NToCRC ( const orxSTRING  _zString,
orxU32  _u32CharNumber 
) [static]

Converts a string to a CRC

Parameters:
[in]_zStringString To convert
[in]_u32CharNumberNumber of characters to process
Returns:
The resulting CRC.

Definition at line 1205 of file orxString.h.

static orxINLINE orxS32 orxCDECL orxString_Print ( orxSTRING  _zDstString,
const orxSTRING  _zSrcString,
  ... 
) [static]

Prints a formated string to a memory buffer

Parameters:
[out]_zDstStringDestination string
[in]_zSrcStringSource formated string
Returns:
The number of written characters

Definition at line 1281 of file orxString.h.

static orxU32 orxFASTCALL orxString_PrintUTF8Character ( orxSTRING  _zDstString,
orxU32  _u32Size,
orxU32  _u32CharacterCodePoint 
) [static]

Prints a unicode character encoded with UTF-8 to an orxSTRING

Parameters:
[in]_zDstStringDestination string
[in]_u32SizeAvailable size on the string
[in]_u32CharacterCodePointUnicode code point of the character to print
Returns:
Length of the encoded UTF-8 character (1, 2, 3 or 4) if valid, orxU32_UNDEFINED otherwise

Definition at line 276 of file orxString.h.

static orxINLINE const orxSTRING orxString_SearchChar ( const orxSTRING  _zString,
orxCHAR  _cChar 
) [static]

Returns the first occurence of _cChar in _zString

Parameters:
[in]_zStringString to analyze
[in]_cCharThe character to find
Returns:
The pointer of the first occurence of _cChar, or orxNULL if not found

Definition at line 1234 of file orxString.h.

static orxINLINE orxS32 orxString_SearchCharIndex ( const orxSTRING  _zString,
orxCHAR  _cChar,
orxU32  _u32Position 
) [static]

Returns the first occurence of _cChar in _zString

Parameters:
[in]_zStringString to analyze
[in]_cCharThe character to find
[in]_u32PositionSearch begin position
Returns:
The index of the next occurence of requested character, starting at given position / -1 if not found

Definition at line 1249 of file orxString.h.

static orxINLINE const orxSTRING orxString_SearchString ( const orxSTRING  _zString1,
const orxSTRING  _zString2 
) [static]

Returns the first occurence of _zString2 in _zString1

Parameters:
[in]_zString1String to analyze
[in]_zString2String that must be inside _zString1
Returns:
The pointer of the first occurence of _zString2, or orxNULL if not found

Definition at line 1219 of file orxString.h.

static orxINLINE const orxSTRING orxString_SkipPath ( const orxSTRING  _zString ) [static]

Skips path

Parameters:
[in]_zStringConcerned string
Returns:
Sub string located after all non-terminal directory separators

Definition at line 170 of file orxString.h.

static orxINLINE const orxSTRING orxString_SkipWhiteSpaces ( const orxSTRING  _zString ) [static]

Skips all white spaces

Parameters:
[in]_zStringConcerned string
Returns:
Sub string located after all leading white spaces

Definition at line 139 of file orxString.h.

static orxINLINE orxSTATUS orxString_ToBool ( const orxSTRING  _zString,
orxBOOL *  _pbOutValue,
const orxSTRING *  _pzRemaining 
) [static]

Convert a string to a boolean

Parameters:
[in]_zStringString To convert
[out]_pbOutValueConverted value
[out]_pzRemainingIf non null, will contain the remaining string after the number conversion
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

Definition at line 1068 of file orxString.h.

static orxINLINE orxU32 orxString_ToCRC ( const orxSTRING  _zString ) [static]

Converts a string to a CRC

Parameters:
[in]_zStringString To convert
Returns:
The resulting CRC.

Definition at line 1191 of file orxString.h.

static orxINLINE orxSTATUS orxString_ToFloat ( const orxSTRING  _zString,
orxFLOAT *  _pfOutValue,
const orxSTRING *  _pzRemaining 
) [static]

Convert a string to a value

Parameters:
[in]_zStringString To convert
[out]_pfOutValueConverted value
[out]_pzRemainingIf non null, will contain the remaining string after the number conversion
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

Definition at line 920 of file orxString.h.

static orxINLINE orxSTATUS orxString_ToS32 ( const orxSTRING  _zString,
orxS32 *  _ps32OutValue,
const orxSTRING *  _pzRemaining 
) [static]

Converts a String to a signed int value, guessing the base

Parameters:
[in]_zStringString To convert
[out]_ps32OutValueConverted value
[out]_pzRemainingIf non null, will contain the remaining string after the number conversion
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

Definition at line 774 of file orxString.h.

static orxINLINE orxSTATUS orxString_ToS32Base ( const orxSTRING  _zString,
orxU32  _u32Base,
orxS32 *  _ps32OutValue,
const orxSTRING *  _pzRemaining 
) [static]

Converts a String to a signed int value using the given base

Parameters:
[in]_zStringString To convert
[in]_u32BaseBase of the read value (generally 10, but can be 16 to read hexa)
[out]_ps32OutValueConverted value
[out]_pzRemainingIf non null, will contain the remaining string after the number conversion
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

Definition at line 733 of file orxString.h.

static orxINLINE orxSTATUS orxString_ToU32 ( const orxSTRING  _zString,
orxU32 *  _pu32OutValue,
const orxSTRING *  _pzRemaining 
) [static]

Converts a String to an unsigned int value, guessing the base

Parameters:
[in]_zStringString To convert
[out]_pu32OutValueConverted value
[out]_pzRemainingIf non null, will contain the remaining string after the number conversion
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

Definition at line 868 of file orxString.h.

static orxINLINE orxSTATUS orxString_ToU32Base ( const orxSTRING  _zString,
orxU32  _u32Base,
orxU32 *  _pu32OutValue,
const orxSTRING *  _pzRemaining 
) [static]

Converts a String to an unsigned int value using the given base

Parameters:
[in]_zStringString To convert
[in]_u32BaseBase of the read value (generally 10, but can be 16 to read hexa)
[out]_pu32OutValueConverted value
[out]_pzRemainingIf non null, will contain the remaining string after the number conversion
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

Definition at line 827 of file orxString.h.

static orxINLINE orxSTATUS orxString_ToVector ( const orxSTRING  _zString,
orxVECTOR _pvOutValue,
const orxSTRING *  _pzRemaining 
) [static]

Convert a string to a vector

Parameters:
[in]_zStringString To convert
[out]_pvOutValueConverted value
[out]_pzRemainingIf non null, will contain the remaining string after the number conversion
Returns:
orxSTATUS_SUCCESS / orxSTATUS_FAILURE

Definition at line 971 of file orxString.h.

static orxINLINE orxSTRING orxString_UpperCase ( orxSTRING  _zString ) [static]

Uppercase a string

Parameters:
[in]_zStringString To convert
Returns:
The converted string.

Definition at line 1166 of file orxString.h.


Variable Documentation

orxDLLAPI const orxU32 sau32CRCTable[256]

Generated for orx by doxygen 1.5.6