utils/string.h file

String utilities.



auto string_is_ascii(const char* string) -> int
Returns if the string is ASCII.
auto string_array_contains_substr(char** str_array, int num_str, const char* substr) -> char*
Returns the matched string if the string array contains the given substring.
auto string_contains_substr(const char* str, const char* substr, const int accept_alternatives) -> int
Returns if the given string contains the given substring.
auto string_is_equal(const char* str1, const char* str2, int ignore_case) -> int
Returns if the two strings are equal.
auto string_convert_to_filename(const char* str) -> char*
Returns a newly allocated string that is a filename version of the given string.
auto string_get_substr_before_backup_ext(const char* str) -> char*
Removes any bak, bak1 etc suffixes from the string and returns a newly allocated string.