◆ FIFTYONE_DEGREES_IP_ADDRESS
#define FIFTYONE_DEGREES_IP_ADDRESS | ( | s | ) |
Macro used to check for NULL before returning the IP address byte array as a const char *.
- Parameters
-
- s - pointer to the fiftyoneDegreesString
- Returns
- const char * string or NULL. NULL if the pointer is NULL or the type stored at the pointer is not an IP address
◆ FIFTYONE_DEGREES_STRING
#define FIFTYONE_DEGREES_STRING ( s ) (const char*)(s == NULL ? NULL : &((fiftyoneDegreesString*)s)->value) Macro used to check for NULL before returning the string as a const char *.
- Parameters
-
- s - pointer to the fiftyoneDegreesString
- Returns
- const char * string or NULL
- Examples
- Hash/StronglyTyped.c.
Enumeration Type Documentation
◆ fiftyoneDegreesStringFormat
Enumeration to indicate what format is held in a string item These are the values that can be held at the first byte of the #fiftyoneDegreeString value.
Function Documentation
◆ fiftyoneDegreesStringCompare()
int fiftyoneDegreesStringCompare ( const char * a, const char * b ) Case insensitively compare two strings.
- Parameters
-
- a - string to compare
- b - other string to compare
- Returns
- 0 if same
◆ fiftyoneDegreesStringCompareLength()
int fiftyoneDegreesStringCompareLength ( char const * a, char const * b, size_t length ) Case insensitively compare two strings up to the length requested.
- Parameters
-
- a - string to compare
- b - other string to compare
- length - of the strings to compare
- Returns
- 0 if same
◆ fiftyoneDegreesStringGet()
fiftyoneDegreesString* fiftyoneDegreesStringGet ( fiftyoneDegreesCollection * strings, uint32_t offset, fiftyoneDegreesCollectionItem * item, fiftyoneDegreesException * exception ) Gets the string at the required offset from the collection provided.
- Parameters
-
- strings - collection to get the string from
- offset - of the string in the collection
- item - to store the string in
- exception - pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
- Returns
- a pointer to string of NULL if the offset is not valid
◆ fiftyoneDegreesStringRead()
void* fiftyoneDegreesStringRead ( const fiftyoneDegreesCollectionFile * file, uint32_t offset, fiftyoneDegreesData * data, fiftyoneDegreesException * exception ) Reads a string from the source file at the offset within the string structure.
- Parameters
-
- file - collection to read from
- offset - of the string in the collection
- data - to store the new string in
- exception - pointer to an exception data structure to be used if an exception occurs. See exceptions.h.
- Returns
- a pointer to the string collection item or NULL if can't be found
◆ fiftyoneDegreesStringSubString()
char* fiftyoneDegreesStringSubString ( const char * a, const char * b ) Case insensitively searching a first occurrence of a substring.
- Parameters
-
- a - string to search
- b - substring to be searched for
- Returns
- pointer to the first occurrence or NULL if not found