StringUtils { protected static List<String> splitString(String string) { List<String> words = new ArrayList<String>(); char[] letters = string.toCharArray(); int length = letters.length; int marker = 0; for (int i = 0; i < length; ++ i) { char c = letters[i]; if (" -_.$".indexOf(c) > -1) { words.add(string.substring(marker, i).toLowerCase(Locale.ENGLISH)); for (++ i; i < length && " -_.$".indexOf(letters[i]) > -1; ++ i) { } marker = i; } else if (Character.isUpperCase(c) && i > 0 && Character.isLowerCase(letters[i - 1])) { words.add(string.substring(marker, i).toLowerCase(Locale.ENGLISH)); marker = i; } } if (marker < length) { words.add(string.substring(marker).toLowerCase(Locale.ENGLISH)); } return words; }  @Deprecated static T fromString(Class<T> returnType, String... strings); static String toDelimited(String string, String delimiter); static String toHyphenated(String string); static String toUnderscored(String string); static String toPascalCase(String string); static String toCamelCase(String string); static String toLabel(String string); static String toNormalized(CharSequence string); static String[] fromCsv(String string); static String toCsv(String... strings); static String escapeHtmlAndBreak(String string, int maxWordLength); static String escapeHtmlAndBreak(String string); static String hex(byte[] bytes); static byte[] hash(String algorithm, String string); static byte[] md5(String string); static byte[] sha1(String string); static byte[] sha512(String string); static byte[] hmac(String algorithm, String key, String string); static byte[] hmacSha1(String key, String string); static String encodeUri(String string); static String decodeUri(String string); static String addQueryParameters(String uri, Object... parameters); static String getQueryParameterValue(String uri, String name); static List<String> getQueryParameterValues(String uri, String name); static Map<String, List<String>> getQueryParameterMap(String url); @Deprecated static String transformUri(String uri, Object... parameters); @Deprecated static String getParameter(String uri, String name); @Deprecated static String[] getParameterValues(String uri, String name); static Pattern getPattern(String pattern); static Matcher getMatcher(CharSequence string, String pattern); static MatchResult getMatcherResult(CharSequence string, String pattern); static boolean matches(CharSequence string, String pattern); static boolean matchAll(CharSequence string, String... patterns); static boolean matchAny(CharSequence string, String... patterns); static int matchCount(CharSequence string, String... patterns); static String replaceAll(CharSequence string, String pattern, String replacement); static String replaceAll(CharSequence string, String pattern, String replacement, String... more); static String removeAll(CharSequence string, CharSequence pattern); static String[] split(CharSequence string, String pattern, int limit); static String[] split(CharSequence string, String pattern); static String escapeCsv(String string); static String escapeHtml(String string); static String escapeJava(String string); static String escapeJavaScript(String string); static String escapeQuotes(String string); static String escapeSql(String string); static String escapeXml(String string); static String unescapeCsv(String string); static String unescapeHtml(String string); static String unescapeJava(String string); static String unescapeJavaScript(String string); static String unescapeXml(String string); static String join(List<String> strings, String delimiter); static String join(String[] strings, String delimiter); static boolean isEmpty(String string); static boolean isBlank(String string); static boolean equals(String str1, String str2); static boolean equalsIgnoreCase(String str1, String str2); static String stripHtml(CharSequence sequence); static String ensureStart(String string, String delimiter); static String ensureEnd(String string, String delimiter); static String ensureSurrounding(String string, String delimiter); static String removeStart(String string, String delimiter); static String removeEnd(String string, String delimiter); static String removeSurrounding(String string, String delimiter); static String getPathInfo(String path, String servletPath); static String toLowerCaseAscii(String string); static String trimAndCollapseWhitespaces(String string); static String getFileName(String filePath); @Deprecated
    static final Charset US_ASCII; @Deprecated
    static final Charset ISO_8859_1; @Deprecated
    static final Charset UTF_8; @Deprecated
    static final Charset UTF_16BE; @Deprecated
    static final Charset UTF_16LE; @Deprecated
    static final Charset UTF_16; }
@Test public void splitString_spaces() { assertEquals(Arrays.asList("a","string","with","spaces"), StringUtils.splitString("a string with spaces")); }
@Test public void splitString_caps() { assertEquals(Arrays.asList("a","string","with","caps"), StringUtils.splitString("aStringWithCaps")); }
@Test public void splitString_underscores() { assertEquals(Arrays.asList("a","string","with","words"), StringUtils.splitString("a_string_with_words")); }
@Test public void splitString_hyphens() { assertEquals(Arrays.asList("a","string","with","words"), StringUtils.splitString("a-string-with-words")); }
@Test public void splitString_periods() { assertEquals(Arrays.asList("a","string","with","words"), StringUtils.splitString("a.string.with.words")); }
@Test public void splitString_multi_delimeter() { assertEquals(Arrays.asList("a","string","with","words"), StringUtils.splitString("a.string. with. Words")); }
@Test public void splitString_multi_caps() { assertEquals(Arrays.asList("this","is","astring"), StringUtils.splitString("thisIsAString")); }
@Test public void splitString_leading_delimeters() { assertEquals(Arrays.asList("", "a","string","with","words"), StringUtils.splitString(" A string with words")); }
@Test public void splitString_trailing_delimeters() { assertEquals(Arrays.asList("a","string","with","words"), StringUtils.splitString("A string with words. ")); }
@Test public void splitString_lowercased() { assertEquals(Arrays.asList("a","string","with","words"), StringUtils.splitString("A STRING with WORDS")); }