orx
1.11
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_KU32_CRC_POLYNOMIAL 0xEDB88320U |
#define | STRTO_CAST (int) |
Functions | |
static orxINLINE orxS32 | orxString_Compare (const orxSTRING _zString1, const orxSTRING _zString2) |
static orxINLINE orxSTRINGID | orxString_ContinueCRC (const orxSTRING _zString, orxSTRINGID _stCRC) |
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 _u32ID) |
orxDLLAPI orxSTRINGID orxFASTCALL | orxString_GetID (const orxSTRING _zString) |
static orxINLINE orxU32 | orxString_GetLength (const orxSTRING _zString) |
static orxINLINE orxU32 | orxString_GetUTF8CharacterLength (orxU32 _u32CharacterCodePoint) |
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 orxSTRINGID | orxString_NContinueCRC (const orxSTRING _zString, orxSTRINGID _stCRC, 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 orxSTRINGID | 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 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 orxSTRINGID | 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_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) |
Variables | |
orxDLLAPI orxU32 | saau32CRCTable [8][256] |
String module Module that handles strings
#define orxSTRING_KC_VECTOR_END ')' |
Definition at line 78 of file orxString.h.
#define orxSTRING_KC_VECTOR_END_ALT '}' |
Definition at line 79 of file orxString.h.
#define orxSTRING_KC_VECTOR_SEPARATOR ',' |
Definition at line 77 of file orxString.h.
#define orxSTRING_KC_VECTOR_START '(' |
Definition at line 75 of file orxString.h.
#define orxSTRING_KC_VECTOR_START_ALT '{' |
Definition at line 76 of file orxString.h.
#define orxSTRING_KU32_CRC_POLYNOMIAL 0xEDB88320U |
DefinesUsing 0x04C11DB7's reverse polynomial for CRC32B
Definition at line 84 of file orxString.h.
#define STRTO_CAST (int) |
Definition at line 61 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 604 of file orxString.h.
|
static |
Continues a CRC with a string one
[in] | _zString | String used to continue the given CRC |
[in] | _stCRC | Base CRC |
Definition at line 1414 of file orxString.h.
|
static |
Deletes a string
[in] | _zString | String to delete |
Definition at line 585 of file orxString.h.
|
static |
Duplicate a string.
[in] | _zSrcString | String to duplicate. |
Definition at line 557 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 689 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 509 of file orxString.h.
|
static |
Gets the extension from a file name
[in] | _zFileName | Concerned file name |
Definition at line 1633 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 342 of file orxString.h.
orxDLLAPI const orxSTRING orxFASTCALL orxString_GetFromID | ( | orxSTRINGID | _u32ID | ) |
Gets a string from an ID (it should have already been stored internally with a call to orxString_GetID)
[in] | _u32ID | 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 173 of file orxString.h.
|
static |
Gets the UTF-8 encoding length of given character
[in] | _u32CharacterCodePoint | Concerned character code |
Definition at line 208 of file orxString.h.
|
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 638 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 196 of file orxString.h.
|
static |
Tells if a character is ASCII from its ID
[in] | _u32CharacterCodePoint | Concerned character code |
Definition at line 186 of file orxString.h.
|
static |
Lowercase a string
[in] | _zString | String To convert |
Definition at line 1277 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 622 of file orxString.h.
|
static |
Continues a CRC with a string one
[in] | _zString | String used to continue the given CRC |
[in] | _stCRC | Base CRC |
[in] | _u32CharNumber | Number of character to process, should be <= orxString_GetLength(_zString) |
Definition at line 1329 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 543 of file orxString.h.
|
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 665 of file orxString.h.
|
static |
Prints a formated string to a memory buffer using a max size
[out] | _zDstString | Destination string |
[in] | _zSrcString | Source formated string |
[in] | _u32CharNumber | Max number of character to print |
Definition at line 1546 of file orxString.h.
|
static |
Converts a string to a CRC
[in] | _zString | String To convert |
[in] | _u32CharNumber | Number of character to process, should be <= orxString_GetLength(_zString) |
Definition at line 1430 of file orxString.h.
|
static |
Prints a formated string to a memory buffer
[out] | _zDstString | Destination string |
[in] | _zSrcString | Source formated string |
Definition at line 1519 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 249 of file orxString.h.
|
static |
Scans a formated string from a memory buffer
[in] | _zString | String to scan |
[in] | _zFormat | Format string |
Definition at line 1581 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 1473 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 1488 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 1458 of file orxString.h.
|
static |
Skips path
[in] | _zString | Concerned string |
Definition at line 130 of file orxString.h.
|
static |
Skips all white spaces
[in] | _zString | Concerned string |
Definition at line 99 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 1204 of file orxString.h.
|
static |
Converts a string to a CRC
[in] | _zString | String To convert |
Definition at line 1444 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 1052 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 822 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 781 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 958 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 917 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 890 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 849 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 1026 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 985 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 1103 of file orxString.h.
|
static |
Uppercase a string
[in] | _zString | String To convert |
Definition at line 1302 of file orxString.h.
orxDLLAPI orxU32 saau32CRCTable[8][256] |
CRC Tables (slice-by-8)