diff dwt/dwthelper/utils.d @ 123:63a09873578e

Fixed compile errors
author Jacob Carlborg <doob@me.com>
date Thu, 15 Jan 2009 23:08:54 +0100
parents 2e671fa40eec
children 38807a925e24
line wrap: on
line diff
--- a/dwt/dwthelper/utils.d	Wed Dec 31 21:01:13 2008 +0100
+++ b/dwt/dwthelper/utils.d	Thu Jan 15 23:08:54 2009 +0100
@@ -1,6 +1,5 @@
 /**
  * Authors: Frank Benoit <keinfarbton@googlemail.com>
- *          Jacob Carlborg <doob@me.com>
  */
 module dwt.dwthelper.utils;
 
@@ -34,8 +33,6 @@
 import tango.text.UnicodeData;
 static import tango.util.collection.model.Seq;
 
-static import dwt.dwthelper.array;
-
 alias bool boolean;
 alias char[] String;
 alias tango.text.Text.Text!(char) StringBuffer;
@@ -272,7 +269,8 @@
     public static float NEGATIVE_INFINITY = ((-1.0f) / 0.0f);
     public static float NaN = (0.0f / 0.0f);
     public static float MAX_VALUE = 3.4028235e+38f;
-    public static float MIN_VALUE = 1.4e-45f;    
+    public static float MIN_VALUE = float.min;
+    //public static float MIN_VALUE = 1.4e-45f;    
     public static int SIZE = 32;
 
     this( float value ){
@@ -535,26 +533,34 @@
     static alias CharacterIsLetterOrDigit isLetterOrDigit;
     static alias CharacterIsSpaceChar isSpaceChar;
     static alias CharacterIsWhitespace isWhitespace;
-    static alias CharacterIsDigit isDigit;
     
-    static T toLowerCase (T)(T c)
+    static char toLowerCase (char c)
     {
         return tango.text.Unicode.toLower([c])[0];
     }
+    
+    static bool isDigit (dchar c)
+    {
+        return tango.text.Unicode.isDigit(c);
+    }
+}
+
+struct String_
+{
+    static String valueOf (int i)
+    {
+        return tango.text.convert.Integer.toString(i);
+    }
 }
 
 String new_String( String cont, int offset, int len ){
     return cont[ offset .. offset+len ].dup;
 }
 
-String new_String(String cont){
+String new_String (String cont){
     return cont.dup;
 }
 
-String new_String(wchar[] cont){
-    return cont.toString16();
-}
-
 public String toUpperCase( String str ){
     return tango.text.Unicode.toUpper( str );
 }
@@ -706,19 +712,6 @@
            "d" );
 }
 
-public alias tango.stdc.stringz.toStringz toStringz;
-public alias tango.stdc.stringz.toString16z toString16z;
-public alias tango.stdc.stringz.fromStringz fromStringz;
-public alias tango.stdc.stringz.fromString16z fromString16z;
-
-struct String_
-{
-    static String valueOf (int v)
-    {
-        return tango.text.convert.Integer.toString(v, 10);
-    }
-}
-
 class RuntimeException : Exception {
     this( String e = null){
         super(e);