Roll back to use the simple Class constructor to support class lock. Fix a bug for...
[IRC.git] / Robust / src / ClassLibrary / Character.java
index 1febbc3c4458e2423cafdf1752b61c8b3480aff8..85406ad841572c4a9208361db313051935ca8288 100644 (file)
@@ -1,5 +1,5 @@
 public class Character {
-
+  
   public static int digit(char ch, int radix) {
     if (ch>='0'&&ch<='9')
       return ch-'0';
@@ -14,6 +14,15 @@ public class Character {
     }
     return -1;
   }
+  
+  public static boolean isDigit(char ch) {
+    // TODO This is a temparory implementation, there are other groups of digits
+    // besides '0' ~ '9'
+    if (ch>='0'&&ch<='9')
+      return true;
+    else 
+      return false;
+  }
 
   char value;