str.cxx

changeset 16
393359908179
parent 8
c8bfa7e6ae1b
child 17
b4fcc69e426a
equal deleted inserted replaced
15:284c2fc6c1cd 16:393359908179
338 338
339 int str::compare (str c) { 339 int str::compare (str c) {
340 return compare (c.chars()); 340 return compare (c.chars());
341 } 341 }
342 342
343 int str::icompare (const char* c) {
344 return icompare (str ((char*)c));
345 }
346
347 int str::icompare (str c) {
348 str a = text;
349 a.tolower();
350 str b = c;
351 b.tolower();
352 return strcmp (a.chars(), b.chars());
353 }
354
343 // ============================================================================ 355 // ============================================================================
344 str str::tolower () { 356 str str::tolower () {
345 str n = text; 357 str n = text;
346 358
347 for (uint u = 0; u < len(); u++) { 359 for (uint u = 0; u < len(); u++) {

mercurial