StringUtils { public static int indexOfAlphabetic(String str) { if (str == null || str.isEmpty()) { return -1; } for (int i = 0; i < str.length(); i++) { if (Character.isAlphabetic(str.charAt(i))) { return i; } } return -1; } private  StringUtils(); static boolean isNullOrEmpty(String str); static int indexOfAlphabetic(String str); static String capitalizeFirst(String str); static String deCapitalizeFirst(String str); static String join(Iterable<T> items, String delimiter); static String join(Iterable<T> items, Function<T, String> function, String delimiter); static String join(T[] items, String delimiter); static String join(T[] items, Function<T, String> function, String delimiter); static String getPrefix(Iterable<T> items, Function<T, String> function); static String getPrefix(Iterable<String> items); static final String loadResourceQuietly(String resourceName); static String loadResource(String resourceName); static final String loadResourceQuietly(URL resourceUrl); static String loadResource(URL resourceUrl); static final String compact(String name); static final String prefixKeywords(String name); static final String toFieldName(String name); static final String toPojoName(String name, String prefix, String suffix);  }
@Test public void testIndexOfAlphabetic() { assertEquals(-1, indexOfAlphabetic(null)); assertEquals(-1, indexOfAlphabetic("")); assertEquals(-1, indexOfAlphabetic("_$123")); assertEquals(0, indexOfAlphabetic("name")); assertEquals(1, indexOfAlphabetic("$name")); assertEquals(1, indexOfAlphabetic("_name")); }