src/string.c

changeset 582
96fa7fa6af4f
parent 581
c067394737ca
child 583
0f3c9662f9b5
equal deleted inserted replaced
581:c067394737ca 582:96fa7fa6af4f
428 #else 428 #else
429 return strncasecmp(string.ptr + string.length - suffix.length, 429 return strncasecmp(string.ptr + string.length - suffix.length,
430 suffix.ptr, suffix.length) == 0; 430 suffix.ptr, suffix.length) == 0;
431 #endif 431 #endif
432 } 432 }
433
434 void cx_strlower(cxmutstr string) {
435 cx_for_n(i, string.length) {
436 string.ptr[i] = tolower(string.ptr[i]);
437 }
438 }
439
440 void cx_strupper(cxmutstr string) {
441 cx_for_n(i, string.length) {
442 string.ptr[i] = toupper(string.ptr[i]);
443 }
444 }

mercurial