2002-05-02 Gonzalo Paniagua Javier <gonzalo@ximian.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 2 May 2002 10:29:03 +0000 (10:29 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Thu, 2 May 2002 10:29:03 +0000 (10:29 -0000)
* Int32.cs:
* Int64.cs:
* UInt32.cs:
* UInt64.cs (Parse): don't use Char.IsNumber to test for hex digits.

svn path=/trunk/mcs/; revision=4220

mcs/class/corlib/System/ChangeLog
mcs/class/corlib/System/Int32.cs
mcs/class/corlib/System/Int64.cs
mcs/class/corlib/System/UInt32.cs
mcs/class/corlib/System/UInt64.cs

index 35b8ffa151e7da687737d312b76a53fe4eb8ab97..5121f9b3e46c2e086db0e69b0300a880c90f56b2 100644 (file)
@@ -1,3 +1,10 @@
+2002-05-02  Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+       * Int32.cs:
+       * Int64.cs:
+       * UInt32.cs:
+       * UInt64.cs (Parse): don't use Char.IsNumber to test for hex digits.
+
 2002-05-01  Duncan Mak  <duncan@ximian.com>
 
        * Convert.cs: 
index 931ce9bcda2b7266c55728dcd78277740d4dd946..b6a663a639546ad001a304823c9e075235768e90 100644 (file)
@@ -184,6 +184,11 @@ namespace System {
                        return false;
                }
 
+               private static bool is_hex (char e)
+               {
+                       return Char.IsDigit (e) || (e >= 'A' && e <= 'F') || (e >= 'a' && e <= 'f');
+               }
+
                public static int Parse (string s, NumberStyles style, IFormatProvider fp)
                {
                        if (s == null)
@@ -276,7 +281,7 @@ namespace System {
                        
                        IsAnything validDigit;
                        if (AllowHexSpecifier)
-                               validDigit = new IsAnything (Char.IsNumber);
+                               validDigit = new IsAnything (is_hex);
                        else
                                validDigit = new IsAnything (Char.IsDigit);
                        
index ecfd2976cf0e580d5270b2fb636cb2ce61f96099..459b77e93a32402b709627a4adf01176e583d9a8 100644 (file)
@@ -185,6 +185,11 @@ namespace System {
                        return false;
                }
 
+               private static bool is_hex (char e)
+               {
+                       return Char.IsDigit (e) || (e >= 'A' && e <= 'F') || (e >= 'a' && e <= 'f');
+               }
+
                public static long Parse (string s, NumberStyles style, IFormatProvider fp)
                {
                        if (s == null)
@@ -277,7 +282,7 @@ namespace System {
                        
                        IsAnything validDigit;
                        if (AllowHexSpecifier)
-                               validDigit = new IsAnything (Char.IsNumber);
+                               validDigit = new IsAnything (is_hex);
                        else
                                validDigit = new IsAnything (Char.IsDigit);
                        
index 109031ba17838bd0a0d629dc1196af085a8a1255..e0e40303a47b01c2ce775882a0f377f778460ff1 100644 (file)
@@ -186,6 +186,11 @@ namespace System {
                        return false;
                }
 
+               private static bool is_hex (char e)
+               {
+                       return Char.IsDigit (e) || (e >= 'A' && e <= 'F') || (e >= 'a' && e <= 'f');
+               }
+               
                [CLSCompliant(false)]
                public static uint Parse (string s, NumberStyles style, IFormatProvider fp)
                {
@@ -276,7 +281,7 @@ namespace System {
                        
                        IsAnything validDigit;
                        if (AllowHexSpecifier)
-                               validDigit = new IsAnything (Char.IsNumber);
+                               validDigit = new IsAnything (is_hex);
                        else
                                validDigit = new IsAnything (Char.IsDigit);
                        
index 4ae319ccdf66f2ccf520f86e9f617f8745174817..daf4ded3040be0ab213ff81ce558bd2d6479734c 100644 (file)
@@ -139,6 +139,11 @@ namespace System {
                        return false;
                }
 
+               private static bool is_hex (char e)
+               {
+                       return Char.IsDigit (e) || (e >= 'A' && e <= 'F') || (e >= 'a' && e <= 'f');
+               }
+
                [CLSCompliant(false)]
                public static ulong Parse (string s, NumberStyles style, IFormatProvider fp)
                {
@@ -229,7 +234,7 @@ namespace System {
                        
                        IsAnything validDigit;
                        if (AllowHexSpecifier)
-                               validDigit = new IsAnything (Char.IsNumber);
+                               validDigit = new IsAnything (is_hex);
                        else
                                validDigit = new IsAnything (Char.IsDigit);