switch from assert to if + return

This commit is contained in:
2025-05-28 20:21:24 +02:00
parent 77ccd59ce3
commit e25b8236e4

View File

@ -132,7 +132,9 @@ bool_t strops_equals(const char* string1, const char* string2) {
}
bool_t strops_starts_with(const char* string1, const char* string2) {
assert(strops_length(string1) >= strops_length(string2) && "string2 cannot be longer than string1");
if (strops_length(string1) < strops_length(string2)) {
return 0;
}
bool_t starts_with = 1;
ull_t i;
for (i = 0; i < strops_length(string2); i++) {