str_in_list()#
The function str_in_list() checks if a given string exists within a list of strings, with an option to perform a case-insensitive comparison.
Prototype
BOOL str_in_list(
const char **list,
const char *str,
BOOL ignore_case
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
|
A null-terminated array of string pointers representing the list to search. |
|
|
The string to search for within the list. |
|
|
If |
Return Value
Returns TRUE if the string is found in the list, otherwise returns FALSE.
Notes
The function iterates through the list and compares each entry with str using either strcmp() or strcasecmp() based on the ignore_case flag.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples