342 |
342 |
343 int str::icompare (const char* c) { |
343 int str::icompare (const char* c) { |
344 return icompare (str ((char*)c)); |
344 return icompare (str ((char*)c)); |
345 } |
345 } |
346 |
346 |
347 int str::icompare (str c) { |
347 int str::icompare (str b) { |
348 str a = text; |
348 return strcmp (tolower().chars(), b.tolower().chars()); |
349 a.tolower(); |
|
350 str b = c; |
|
351 b.tolower(); |
|
352 return strcmp (a.chars(), b.chars()); |
|
353 } |
349 } |
354 |
350 |
355 // ============================================================================ |
351 // ============================================================================ |
356 str str::tolower () { |
352 str str::tolower () { |
357 str n = text; |
353 str n = text; |