![]() |
HBBTV
22.11.0
|
String utility functions. More...
Go to the source code of this file.
Enumerations | |
enum | E_STRING_FORMAT { STRING_FORMAT_UNKNOWN, STRING_FORMAT_DVB, STRING_FORMAT_UTF8, STRING_FORMAT_UTF16, STRING_FORMAT_UTF8_LATIN1 } |
Functions | |
S_HBBTV_STRING | HBBTV_StrCreate (U32BIT strlen, U8BIT *data) |
Creates an S_HBBTV_STRING with the given strlen containing a copy of the given data. More... | |
void | HBBTV_StrFree (S_HBBTV_STRING *string) |
Frees the memory allocated for the specified S_HBBTV_STRING. More... | |
S_HBBTV_STRING | HBBTV_StrCopy (S_HBBTV_STRING source) |
S_HBBTV_STRING | HBBTV_StrGetUrlOrigin (S_HBBTV_STRING *url) |
Returns a string containing the origin of the given URL as defined by RFC6454 <scheme>://<domain>:<port> | |
void * | HBBTV_JSStringCreate (S_HBBTV_STRING *value, E_STRING_FORMAT format) |
Create a string from a given S_HBBTV_STRING which is of the specified format. More... | |
void * | HBBTV_JSStringCreateFromAscii (U8BIT *ascii_string) |
Create a string from an ASCII string. More... | |
void * | HBBTV_JSStringCreateFromUtf8 (U8BIT *utf_string) |
Create a string from a UTF-8 string. More... | |
void * | HBBTV_JSStringCreateFromUtf16 (U16BIT *utf_string) |
Create a string from a UTF-16 string. More... | |
void | HBBTV_JSStringReplace (void *string, S_HBBTV_STRING *value) |
Replace string data with given data. More... | |
BOOLEAN | HBBTV_JSStringEqual (void *obj, S_HBBTV_STRING *string, BOOLEAN ignore_case) |
Check if two strings are the same. More... | |
S8BIT | HBBTV_JSStringCompare (void *obj, S_HBBTV_STRING *str2, BOOLEAN ignore_case) |
Compares the two strings and returns -1 if str2 < string object, 0 if the strings are equal, including their lengths, +1 if str2 > string object. More... | |
BOOLEAN | HBBTV_JSStringContains (void *obj, S_HBBTV_STRING *str2, BOOLEAN ignore_case) |
Checks whether the string object is a substring of str2. More... | |
void | HBBTV_JSStringSetFormat (E_HBBTV_STRING_FORMAT string_format) |
Saves the string format supported by the DVB stack. More... | |
U8BIT * | HBBTV_JSStringGetStringLatin1 (void *obj, U32BIT *length) |
Variables | |
void * | JS_HBBTV_STRING_CLASS |
String utility functions.
S8BIT HBBTV_JSStringCompare | ( | void * | obj, |
S_HBBTV_STRING * | str2, | ||
BOOLEAN | ignore_case | ||
) |
Compares the two strings and returns -1 if str2 < string object, 0 if the strings are equal, including their lengths, +1 if str2 > string object.
obj | - string object |
str2 | - string to check against |
ignore_case | - FALSE if case sensitive search is to be performed |
BOOLEAN HBBTV_JSStringContains | ( | void * | obj, |
S_HBBTV_STRING * | str2, | ||
BOOLEAN | ignore_case | ||
) |
Checks whether the string object is a substring of str2.
obj | - string object to be searched for |
str2 | - string to search through |
ignore_case | - FALSE if case sensitive search is to be performed |
void* HBBTV_JSStringCreate | ( | S_HBBTV_STRING * | value, |
E_STRING_FORMAT | format | ||
) |
Create a string from a given S_HBBTV_STRING which is of the specified format.
value | - S_HBBTV_STRING containing the data for the string to be created |
format | - format of the string data in S_HBBTV_STRING |
void* HBBTV_JSStringCreateFromAscii | ( | U8BIT * | ascii_string | ) |
Create a string from an ASCII string.
ascii_string | - character data for the string to be created |
void* HBBTV_JSStringCreateFromUtf16 | ( | U16BIT * | utf_string | ) |
Create a string from a UTF-16 string.
utf_string | - character data for the string to be created |
void* HBBTV_JSStringCreateFromUtf8 | ( | U8BIT * | utf_string | ) |
Create a string from a UTF-8 string.
utf_string | - character data for the string to be created |
BOOLEAN HBBTV_JSStringEqual | ( | void * | obj, |
S_HBBTV_STRING * | str2, | ||
BOOLEAN | ignore_case | ||
) |
Check if two strings are the same.
obj | - the string object |
string | - the string to check |
obj | - the string object |
str2 | - the string to check |
ignore_case | - FALSE if case sensitive search should be performed |
void HBBTV_JSStringReplace | ( | void * | obj, |
S_HBBTV_STRING * | value | ||
) |
Replace string data with given data.
string | - the string object |
value | - the new string value |
void HBBTV_JSStringSetFormat | ( | E_HBBTV_STRING_FORMAT | string_format | ) |
Saves the string format supported by the DVB stack.
string_format | Format supported by the DVB stack |
S_HBBTV_STRING HBBTV_StrCreate | ( | U32BIT | strlen, |
U8BIT * | data | ||
) |
Creates an S_HBBTV_STRING with the given strlen containing a copy of the given data.
strlen | number of characters (excluding the string terminator) contained in data |
data | buffer containing the source string |
void HBBTV_StrFree | ( | S_HBBTV_STRING * | string | ) |
Frees the memory allocated for the specified S_HBBTV_STRING.
string | pointer to the S_HBBTV_STRING to be freed |