diff trunk/src/dil/doc/Doc.d @ 746:32a8ddd330f8

Using icompare() instead of toLower().
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sun, 10 Feb 2008 02:14:08 +0100
parents 7299159c3a19
children 8caf18892c1b
line wrap: on
line diff
--- a/trunk/src/dil/doc/Doc.d	Sat Feb 09 23:23:01 2008 +0100
+++ b/trunk/src/dil/doc/Doc.d	Sun Feb 10 02:14:08 2008 +0100
@@ -10,7 +10,7 @@
 import dil.Unicode;
 import common;
 
-import tango.text.Ascii : toLower;
+import tango.text.Ascii : icompare;
 
 class DDocComment
 {
@@ -41,7 +41,7 @@
   bool isDitto()
   {
     if (summary && sections.length == 1 &&
-        toLower(strip(summary.text.dup)) == "ditto")
+        icompare(strip(summary.text), "ditto") == 0)
       return true;
     return false;
   }
@@ -68,6 +68,7 @@
 
 /// Strips leading and trailing whitespace characters.
 /// Whitespace: ' ', '\t', '\v', '\f' and '\n'
+/// Returns: a slice into str.
 char[] strip(char[] str)
 {
   if (str.length == 0)
@@ -233,7 +234,7 @@
 
   bool Is(char[] name2)
   {
-    return toLower(name.dup) == name2;
+    return icompare(name, name2) == 0;
   }
 }