Fix PSP compiled
This commit is contained in:
@@ -155,4 +155,17 @@ bool_t stringEndsWith(const char_t *str, const char_t *suffix) {
|
||||
size_t suffixLen = strlen(suffix);
|
||||
if(suffixLen > strLen) return false;
|
||||
return strcmp(str + strLen - suffixLen, suffix) == 0;
|
||||
}
|
||||
|
||||
bool_t stringEndsWithCaseInsensitive(
|
||||
const char_t *str,
|
||||
const char_t *suffix
|
||||
) {
|
||||
assertNotNull(str, "str must not be NULL");
|
||||
assertNotNull(suffix, "suffix must not be NULL");
|
||||
|
||||
size_t strLen = strlen(str);
|
||||
size_t suffixLen = strlen(suffix);
|
||||
if(suffixLen > strLen) return false;
|
||||
return strcasecmp(str + strLen - suffixLen, suffix) == 0;
|
||||
}
|
||||
@@ -143,4 +143,13 @@ bool_t stringToF32(const char_t *str, float_t *out);
|
||||
* @param suffix The suffix to check for.
|
||||
* @return TRUE if the string ends with the suffix, FALSE otherwise.
|
||||
*/
|
||||
bool_t stringEndsWith(const char_t *str, const char_t *suffix);
|
||||
bool_t stringEndsWith(const char_t *str, const char_t *suffix);
|
||||
|
||||
/**
|
||||
* Determines if a string ends with a specified suffix, ignoring case.
|
||||
*
|
||||
* @param str The string to check.
|
||||
* @param suffix The suffix to check for.
|
||||
* @return TRUE if the string ends with the suffix, FALSE otherwise.
|
||||
*/
|
||||
bool_t stringEndsWithCaseInsensitive(const char_t *str, const char_t *suffix);
|
||||
Reference in New Issue
Block a user