APG
… ABNF Parser Generator
|
A small chest of helpful tools. More...
Go to the source code of this file.
Functions | |
void | vDefaultAlertHandler (unsigned int uiLine, const char *cpFile) |
int | apg_stricmp (const char *cpLhs, const char *cpRhs) |
void | vCharToAChar (apg_achar *acpAChars, const char *cpChars, apg_uint uiLen) |
apg_uint | uiACharToStringSize (const apg_achar *acpAChars, apg_uint uiALen) |
apg_uint | uiACharToString (char *cpChars, apg_uint uiCLen, const apg_achar *acpAChars, apg_uint uiALen) |
A small chest of helpful tools.
Definition in file Tools.c.
int apg_stricmp | ( | const char * | cpLhs, |
const char * | cpRhs | ||
) |
Case-insensitive: compares two strings. The two strings are compared, character for character. NOTE: stricmp() is non-ANSI and therefore, not used
cpLhs | pointer to the left of the two strings to compare |
cpRhs | pointer to the right of the two strings to compare |
apg_uint uiACharToString | ( | char * | cpChars, |
apg_uint | uiCLen, | ||
const apg_achar * | acpAChars, | ||
apg_uint | uiALen | ||
) |
Converts a string of alphabet characters to a null-terminated printable ASCII string. Non-printing characters are of the form: <xFF>. Brackets are used to distinguish the hex format from adjacent printing characters of "x" and "F", for example. The worst case scenario is that all translated characters will be of the form <xFF>, where sizeof(apg_achar) is 1 for example. To be safe, the cpChars buffer size, uiCLen, should be at least: uiALen * ((sizeof(apg_achar) * 2) + 3) plus 1 for terminating null. To get the exact size in advance, see uiACharToStringSize().
cpChars | pointer to the buffer to receive the printable, 8-bit character string |
uiCLen | length of the cpChars buffer |
acpAChars | pointer the apg_achar character string |
uiALen | the number of apg_achar characters |
Calculate the size of the string translated by uiACharToString()
acpAChars | pointer the apg_achar character string |
uiALen | the number of apg_achar characters |