2010-06-22 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / corlib / System.Globalization / CharUnicodeInfo.cs
index ddbd2ba5d7a52a265cbe78a8d6514d3eb913456f..5da049089aa1c11cee177793d31ed7f584d9b92f 100644 (file)
 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
-#if NET_2_0
 using System;
 
 namespace System.Globalization
 {
-       // FIXME: might be better to have them as icall.
        public static class CharUnicodeInfo
        {
-               public static int GetDecimalDigitValue (char c)
+               public static int GetDecimalDigitValue (char ch)
                {
-                       int i = (int) c;
+                       int i = (int) ch;
                        switch (i) {
                        // They are not decimal digits but are regarded as they were.
                        case 178:
@@ -58,7 +56,7 @@ namespace System.Globalization
                        if (8320 <= i && i < 8330)
                                return i - 8320;
 
-                       if (!Char.IsDigit (c))
+                       if (!Char.IsDigit (ch))
                                return -1;
 
                        if (i < 58)
@@ -118,13 +116,13 @@ namespace System.Globalization
                        return GetDecimalDigitValue (s [index]);
                }
 
-               public static int GetDigitValue (char c)
+               public static int GetDigitValue (char ch)
                {
-                       int i = GetDecimalDigitValue (c);
+                       int i = GetDecimalDigitValue (ch);
 
                        if (i >= 0)
                                return i;
-                       i = (int) c;
+                       i = (int) ch;
 
                        if (i == 9450)
                                return 0;
@@ -155,13 +153,13 @@ namespace System.Globalization
                        return GetDigitValue (s [index]);
                }
 
-               public static double GetNumericValue (char c)
+               public static double GetNumericValue (char ch)
                {
-                       int i = GetDigitValue (c);
+                       int i = GetDigitValue (ch);
                        if (i >= 0)
                                return i;
 
-                       i = (int) c;
+                       i = (int) ch;
 
                        switch (i) {
                        case 188:
@@ -259,7 +257,7 @@ namespace System.Globalization
                        if (12977 <= i && i < 12992)
                                return i - 12941;
 
-                       if (!char.IsNumber (c))
+                       if (!char.IsNumber (ch))
                                return -1;
 
                        if (i < 3891)
@@ -295,13 +293,12 @@ namespace System.Globalization
                        return GetNumericValue (s [index]);
                }
 
-               public static UnicodeCategory GetUnicodeCategory (char c)
+               public static UnicodeCategory GetUnicodeCategory (char ch)
                {
-                       return Char.GetUnicodeCategory (c);
+                       return Char.GetUnicodeCategory (ch);
                }
 
-               public static UnicodeCategory GetUnicodeCategory (string s,
-                       int index)
+               public static UnicodeCategory GetUnicodeCategory (string s, int index)
                {
                        if (s == null)
                                throw new ArgumentNullException ("s");
@@ -309,5 +306,3 @@ namespace System.Globalization
                }
        }
 }
-
-#endif