Here you can find the source of charArrayIsDigit(char[] str, int start, int len)
public static int charArrayIsDigit(char[] str, int start, int len)
//package com.java2s; public class Main { public static int charArrayIsDigit(char[] str, int start, int len) { int value = 0; for (int i = start; i < start + len; i++) { char ch = str[i]; if (ch >= '0' && ch <= '9') { value++;//from w w w .java 2 s .co m } else { return value; } } return value; } }