directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r418528 - /directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
Date Sat, 01 Jul 2006 23:47:26 GMT
Author: elecharny
Date: Sat Jul  1 16:47:26 2006
New Revision: 418528

URL: http://svn.apache.org/viewvc?rev=418528&view=rev
Log:
Added a isDigit() method

Modified:
    directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java

Modified: directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
URL: http://svn.apache.org/viewvc/directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java?rev=418528&r1=418527&r2=418528&view=diff
==============================================================================
--- directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
(original)
+++ directory/branches/shared/optimization/ldap/src/main/java/org/apache/directory/shared/ldap/util/StringTools.java
Sat Jul  1 16:47:26 2006
@@ -1373,6 +1373,19 @@
         }
     }
 
+    /**
+     * Test if the current character is a digit <digit> ::= '0' | '1' | '2' |
+     * '3' | '4' | '5' | '6' | '7' | '8' | '9'
+     * 
+     * @param byteArray
+     *            The buffer which contains the data
+     * @return <code>true</code> if the current character is a Digit
+     */
+    public static boolean isDigit( char car )
+    {
+        return ( car >= '0' ) && ( car <= '9' );
+    }
+
 
     /**
      * Test if the current character is an Alpha character : <alpha> ::=



Mime
View raw message