commit asset prog

This commit is contained in:
2025-08-26 16:23:08 -05:00
parent 8af2f044ed
commit a543bc7c00
11 changed files with 244 additions and 126 deletions

View File

@@ -125,4 +125,14 @@ bool_t stringToU16(const char_t *str, uint16_t *out) {
}
*out = (uint16_t)result;
return true;
}
bool_t stringEndsWith(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 strcmp(str + strLen - suffixLen, suffix) == 0;
}