| 351 | } |
| 352 | |
| 353 | int String_IndexOfConst(const cc_string* str, const char* sub) { |
| 354 | int i, j; |
| 355 | |
| 356 | for (i = 0; i < str->length; i++) { |
| 357 | for (j = 0; sub[j] && (i + j) < str->length; j++) { |
| 358 | |
| 359 | if (str->buffer[i + j] != sub[j]) break; |
| 360 | } |
| 361 | if (sub[j] == '\0') return i; |
| 362 | } |
| 363 | return -1; |
| 364 | } |
| 365 | |
| 366 | int String_CaselessContains(const cc_string* str, const cc_string* sub) { |
| 367 | char strCur, subCur; |
no outgoing calls
no test coverage detected