orx
1.14
Portable Game Engine
|
Macros | |
#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 '{' |
#define | orxString_ToCRC orxString_Hash |
#define | STRTO_CAST (int) |
Functions | |
static orxINLINE orxS32 | orxString_Compare (const orxSTRING _zString1, const orxSTRING _zString2) |
static orxINLINE orxSTATUS | orxString_Delete (orxSTRING _zString) |
static orxINLINE orxSTRING | orxString_Duplicate (const orxSTRING _zSrcString) |
orxDLLAPI void orxFASTCALL | orxString_Exit () |
static orxINLINE orxU32 | orxString_ExtractBase (const orxSTRING _zString, const orxSTRING *_pzRemaining) |
static orxINLINE orxU32 | orxString_GetCharacterCount (const orxSTRING _zString) |
static orxINLINE const orxSTRING | orxString_GetExtension (const orxSTRING _zFileName) |
static orxU32 orxFASTCALL | orxString_GetFirstCharacterCodePoint (const orxSTRING _zString, const orxSTRING *_pzRemaining) |
orxDLLAPI const orxSTRING orxFASTCALL | orxString_GetFromID (orxSTRINGID _stID) |
orxDLLAPI orxSTRINGID orxFASTCALL | orxString_GetID (const orxSTRING _zString) |
static orxINLINE orxU32 | orxString_GetLength (const orxSTRING _zString) |
static orxINLINE orxU32 | orxString_GetUTF8CharacterLength (orxU32 _u32CharacterCodePoint) |
orxDLLAPI orxSTRINGID orxFASTCALL | orxString_Hash (const orxSTRING _zString) |
static orxINLINE orxS32 | orxString_ICompare (const orxSTRING _zString1, const orxSTRING _zString2) |
orxDLLAPI orxSTATUS orxFASTCALL | orxString_Init () |
static orxINLINE orxBOOL | orxString_IsCharacterAlphaNumeric (orxU32 _u32CharacterCodePoint) |
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 orxSTRING | orxString_NCopy (orxSTRING _zDstString, const orxSTRING _zSrcString, orxU32 _u32CharNumber) |
orxDLLAPI orxSTRINGID orxFASTCALL | orxString_NHash (const orxSTRING _zString, 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 orxU32 orxFASTCALL | orxString_PrintUTF8Character (orxSTRING _zDstString, orxU32 _u32Size, orxU32 _u32CharacterCodePoint) |
static orxINLINE orxS32 orxCDECL | orxString_Scan (const orxSTRING _zString, const orxSTRING _zFormat,...) |
static orxINLINE const orxSTRING | orxString_SearchChar (const orxSTRING _zString, orxCHAR _cChar) |
static orxINLINE orxS32 | orxString_SearchCharIndex (const orxSTRING _zString, orxCHAR _cChar, orxS32 _s32Position) |
static orxINLINE const orxSTRING | orxString_SearchString (const orxSTRING _zString1, const orxSTRING _zString2) |
orxDLLAPI void orxFASTCALL | orxString_Setup () |
static orxINLINE const orxSTRING | orxString_SkipPath (const orxSTRING _zString) |
static orxINLINE const orxSTRING | orxString_SkipWhiteSpaces (const orxSTRING _zString) |
orxDLLAPI const orxSTRING orxFASTCALL | orxString_Store (const orxSTRING _zString) |
static orxINLINE orxSTATUS | orxString_ToBool (const orxSTRING _zString, orxBOOL *_pbOutValue, const orxSTRING *_pzRemaining) |
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_ToS64 (const orxSTRING _zString, orxS64 *_ps64OutValue, const orxSTRING *_pzRemaining) |
static orxINLINE orxSTATUS | orxString_ToS64Base (const orxSTRING _zString, orxU32 _u32Base, orxS64 *_ps64OutValue, 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_ToU64 (const orxSTRING _zString, orxU64 *_pu64OutValue, const orxSTRING *_pzRemaining) |
static orxINLINE orxSTATUS | orxString_ToU64Base (const orxSTRING _zString, orxU32 _u32Base, orxU64 *_pu64OutValue, const orxSTRING *_pzRemaining) |
static orxINLINE orxSTATUS | orxString_ToVector (const orxSTRING _zString, orxVECTOR *_pvOutValue, const orxSTRING *_pzRemaining) |
static orxINLINE orxSTRING | orxString_UpperCase (orxSTRING _zString) |
String module Module that handles strings
#define orxSTRING_KC_VECTOR_END ')' |
Definition at line 79 of file orxString.h.
#define orxSTRING_KC_VECTOR_END_ALT '}' |
Definition at line 80 of file orxString.h.
#define orxSTRING_KC_VECTOR_SEPARATOR ',' |
Definition at line 78 of file orxString.h.
#define orxSTRING_KC_VECTOR_START '(' |
Definition at line 76 of file orxString.h.
#define orxSTRING_KC_VECTOR_START_ALT '{' |
Definition at line 77 of file orxString.h.
#define orxString_ToCRC orxString_Hash |
Defines
Definition at line 86 of file orxString.h.
#define STRTO_CAST (int) |
Definition at line 62 of file orxString.h.
|
static |
Compare two strings, case sensitive. If the first one is smaller than the second it returns -1, 1 if the second one is bigger than the first, and 0 if they are equals
[in] | _zString1 | First String to compare |
[in] | _zString2 | Second string to compare |
Definition at line 602 of file orxString.h.
|
static |
Deletes a string
[in] | _zString | String to delete |
Definition at line 583 of file orxString.h.
|
static |
Duplicate a string.
[in] | _zSrcString | String to duplicate. |
Definition at line 555 of file orxString.h.
|
static |
Extracts the base (2, 8, 10 or 16) from a literal number
[in] | _zString | String from which to extract the base |
[out] | _pzRemaining | If non null, will contain the remaining literal number, right after the base prefix (0x, 0b or 0) |
Definition at line 687 of file orxString.h.
|
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())
[in] | _zString | Concerned string |
Definition at line 506 of file orxString.h.
|
static |
Gets the extension from a file name
[in] | _zFileName | Concerned file name |
Definition at line 1451 of file orxString.h.
|
static |
Returns the code of the first character of the UTF-8 string
[in] | _zString | Concerned string |
[out] | _pzRemaining | If non null, will contain the remaining string after the first UTF-8 character |
Definition at line 339 of file orxString.h.
orxDLLAPI const orxSTRING orxFASTCALL orxString_GetFromID | ( | orxSTRINGID | _stID | ) |
Gets a string from an ID (it should have already been stored internally with a call to orxString_GetID)
[in] | _stID | Concerned string ID |
orxDLLAPI orxSTRINGID orxFASTCALL orxString_GetID | ( | const orxSTRING | _zString | ) |
Gets a string's ID (and stores the string internally to prevent duplication)
[in] | _zString | Concerned string |
|
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)
[in] | _zString | String used for length computation |
Definition at line 170 of file orxString.h.
|
static |
Gets the UTF-8 encoding length of given character
[in] | _u32CharacterCodePoint | Concerned character code |
Definition at line 205 of file orxString.h.
orxDLLAPI orxSTRINGID orxFASTCALL orxString_Hash | ( | const orxSTRING | _zString | ) |
Gets a string's ID (aka hash), without storing the string internally
[in] | _zString | Concerned string |
|
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
[in] | _zString1 | First String to compare |
[in] | _zString2 | Second string to compare |
Definition at line 636 of file orxString.h.
Initializess the structure module
|
static |
Tells if a character is alpha-numeric from its ID
[in] | _u32CharacterCodePoint | Concerned character code |
Definition at line 193 of file orxString.h.
|
static |
Tells if a character is ASCII from its ID
[in] | _u32CharacterCodePoint | Concerned character code |
Definition at line 183 of file orxString.h.
|
static |
Lowercase a string
[in] | _zString | String To convert |
Definition at line 1275 of file orxString.h.
|
static |
Compare N first character from two strings, case sensitive. If the first one is smaller than the second it returns -1, 1 if the second one is bigger than the first and 0 if they are equals.
[in] | _zString1 | First String to compare |
[in] | _zString2 | Second string to compare |
[in] | _u32CharNumber | Number of character to compare |
Definition at line 620 of file orxString.h.
|
static |
Copies up to N characters from a string
[in] | _zDstString | Destination string |
[in] | _zSrcString | Source string |
[in] | _u32CharNumber | Number of characters to copy |
Definition at line 540 of file orxString.h.
orxDLLAPI orxSTRINGID orxFASTCALL orxString_NHash | ( | const orxSTRING | _zString, |
orxU32 | _u32CharNumber | ||
) |
Gets a string's ID (aka hash), without storing the string internally
[in] | _zString | Concerned string |
[in] | _u32CharNumber | Number of character to process, should be <= orxString_GetLength(_zString) |
|
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.
[in] | _zString1 | First String to compare |
[in] | _zString2 | Second string to compare |
[in] | _u32CharNumber | Number of character to compare |
Definition at line 663 of file orxString.h.
|
static |
Prints a formatted string to a memory buffer using a max size
[out] | _zDstString | Destination string |
[in] | _u32CharNumber | Max number of character to print, including the terminating null character |
[in] | _zSrcString | Source formatted string |
Definition at line 1388 of file orxString.h.
|
static |
Prints a unicode character encoded with UTF-8 to an orxSTRING
[in] | _zDstString | Destination string |
[in] | _u32Size | Available size on the string |
[in] | _u32CharacterCodePoint | Unicode code point of the character to print |
Definition at line 246 of file orxString.h.
|
static |
Scans a formatted string from a memory buffer
[in] | _zString | String to scan |
[in] | _zFormat | Format string |
Definition at line 1427 of file orxString.h.
|
static |
Returns the first occurrence of _cChar in _zString
[in] | _zString | String to analyze |
[in] | _cChar | The character to find |
Definition at line 1341 of file orxString.h.
|
static |
Returns the first occurrence of _cChar in _zString
[in] | _zString | String to analyze |
[in] | _cChar | The character to find |
[in] | _s32Position | Search begin position |
Definition at line 1356 of file orxString.h.
|
static |
Returns the first occurrence of _zString2 in _zString1
[in] | _zString1 | String to analyze |
[in] | _zString2 | String that must be inside _zString1 |
Definition at line 1326 of file orxString.h.
|
static |
Skips path
[in] | _zString | Concerned string |
Definition at line 127 of file orxString.h.
|
static |
Skips all white spaces
[in] | _zString | Concerned string |
Definition at line 96 of file orxString.h.
orxDLLAPI const orxSTRING orxFASTCALL orxString_Store | ( | const orxSTRING | _zString | ) |
Stores a string internally: equivalent to an optimized call to orxString_GetFromID(orxString_GetID(_zString))
[in] | _zString | Concerned string |
|
static |
Convert a string to a boolean
[in] | _zString | String To convert |
[out] | _pbOutValue | Converted value |
[out] | _pzRemaining | If non null, will contain the remaining string after the boolean conversion |
Definition at line 1202 of file orxString.h.
|
static |
Convert a string to a value
[in] | _zString | String To convert |
[out] | _pfOutValue | Converted value |
[out] | _pzRemaining | If non null, will contain the remaining string after the number conversion |
Definition at line 1050 of file orxString.h.
|
static |
Converts a String to a signed int value, guessing the base
[in] | _zString | String To convert |
[out] | _ps32OutValue | Converted value |
[out] | _pzRemaining | If non null, will contain the remaining string after the number conversion |
Definition at line 820 of file orxString.h.
|
static |
Converts a String to a signed int value using the given base
[in] | _zString | String To convert |
[in] | _u32Base | Base of the read value (generally 10, but can be 16 to read hexa) |
[out] | _ps32OutValue | Converted value |
[out] | _pzRemaining | If non null, will contain the remaining string after the number conversion |
Definition at line 779 of file orxString.h.
|
static |
Converts a String to a signed int value, guessing the base
[in] | _zString | String To convert |
[out] | _ps64OutValue | Converted value |
[out] | _pzRemaining | If non null, will contain the remaining string after the number conversion |
Definition at line 956 of file orxString.h.
|
static |
Converts a String to a signed int value using the given base
[in] | _zString | String To convert |
[in] | _u32Base | Base of the read value (generally 10, but can be 16 to read hexa) |
[out] | _ps64OutValue | Converted value |
[out] | _pzRemaining | If non null, will contain the remaining string after the number conversion |
Definition at line 915 of file orxString.h.
|
static |
Converts a String to an unsigned int value, guessing the base
[in] | _zString | String To convert |
[out] | _pu32OutValue | Converted value |
[out] | _pzRemaining | If non null, will contain the remaining string after the number conversion |
Definition at line 888 of file orxString.h.
|
static |
Converts a String to an unsigned int value using the given base
[in] | _zString | String To convert |
[in] | _u32Base | Base of the read value (generally 10, but can be 16 to read hexa) |
[out] | _pu32OutValue | Converted value |
[out] | _pzRemaining | If non null, will contain the remaining string after the number conversion |
Definition at line 847 of file orxString.h.
|
static |
Converts a String to an unsigned int value, guessing the base
[in] | _zString | String To convert |
[out] | _pu64OutValue | Converted value |
[out] | _pzRemaining | If non null, will contain the remaining string after the number conversion |
Definition at line 1024 of file orxString.h.
|
static |
Converts a String to an unsigned int value using the given base
[in] | _zString | String To convert |
[in] | _u32Base | Base of the read value (generally 10, but can be 16 to read hexa) |
[out] | _pu64OutValue | Converted value |
[out] | _pzRemaining | If non null, will contain the remaining string after the number conversion |
Definition at line 983 of file orxString.h.
|
static |
Convert a string to a vector
[in] | _zString | String To convert |
[out] | _pvOutValue | Converted value. N.B.: if only two components (x, y) are defined, the z component will be set to zero |
[out] | _pzRemaining | If non null, will contain the remaining string after the number conversion |
Definition at line 1101 of file orxString.h.
|
static |
Uppercase a string
[in] | _zString | String To convert |
Definition at line 1300 of file orxString.h.