| 406 | } |
| 407 | |
| 408 | int String_Compare(const cc_string* a, const cc_string* b) { |
| 409 | char aCur, bCur; |
| 410 | int i, minLen = min(a->length, b->length); |
| 411 | |
| 412 | for (i = 0; i < minLen; i++) { |
| 413 | aCur = a->buffer[i]; Char_MakeLower(aCur); |
| 414 | bCur = b->buffer[i]; Char_MakeLower(bCur); |
| 415 | |
| 416 | if (aCur == bCur) continue; |
| 417 | return (cc_uint8)aCur - (cc_uint8)bCur; |
| 418 | } |
| 419 | |
| 420 | /* all chars are equal here - same string, or a substring */ |
| 421 | return a->length - b->length; |
| 422 | } |
| 423 | |
| 424 | void String_Format1(cc_string* str, const char* format, const void* a1) { |
| 425 | String_Format4(str, format, a1, NULL, NULL, NULL); |
no outgoing calls
no test coverage detected