libGimbal 0.1.0
C17-Based Extended Standard Library and Cross-Language Runtime Framework
|
Go to the source code of this file.
Functions | |
Per-Character | |
Methods for dealing with individual ASCII characters | |
int | gblAsciiDigitValue (char c) |
int | gblAsciiHexDigitValue (char c) |
C Strings | |
Methods for operating on NULL-terminated C strings | |
size_t | gblStrnlen (const char *pStr1, size_t length) |
int | gblStrCaseCmp (const char *pStr1, const char *pStr2) |
int | gblStrnCaseCmp (const char *pStr1, const char *pStr2, size_t length) |
char * | gblStrCaseStr (const char *pStr, const char *pSub) |
char * | gblStrdup (const char *pString) |
char * | gblStrndup (const char *pString, size_t length) |
char * | gblStrnReverse (char *pString, size_t length) |
Low-level C string and character-based functions.
This file contains the lowest-level string API for working with individual characters or C strings.
Definition in file gimbal_string.h.
int gblAsciiDigitValue | ( | char | c | ) |
Returns the numeric value of the given base-10 ASCII digit.
int gblAsciiHexDigitValue | ( | char | c | ) |
Returns the numeric value of the given hexadecimal ASCII digit.
size_t gblStrnlen | ( | const char * | pStr1, |
size_t | length | ||
) |
Returns the length of the given NULL-terminated C string or len
, if it's less than it's length.
int gblStrCaseCmp | ( | const char * | pStr1, |
const char * | pStr2 | ||
) |
Compares the two NULL-terminaed C strings without case-sensitivity.
int gblStrnCaseCmp | ( | const char * | pStr1, |
const char * | pStr2, | ||
size_t | length | ||
) |
Compares up to length
bytes of the two C strings without case-sensitivity.
char * gblStrCaseStr | ( | const char * | pStr, |
const char * | pSub | ||
) |
Searches for the beginning of the pSub
substring within pStr
.
char * gblStrdup | ( | const char * | pString | ) |
Duplicates the given string, returning a new one allocatedon the heap.
char * gblStrndup | ( | const char * | pString, |
size_t | length | ||
) |
Duplicates up to length
bytes of the given string on the heap.
char * gblStrnReverse | ( | char * | pString, |
size_t | length | ||
) |
Reverses up to length
bytes within the given character array.