Splits a String by Character type as returned by
java.lang.Character.getType(char)
. Groups of contiguous
characters of the same type are returned as complete tokens, with the
following exception: the character of type
Character.UPPERCASE_LETTER
, if any, immediately preceding a
token of type Character.LOWERCASE_LETTER
will belong to the
following token rather than to the preceding, if any,
Character.UPPERCASE_LETTER
token.
StringUtils.splitByCharacterTypeCamelCase(null) = null
StringUtils.splitByCharacterTypeCamelCase("") = []
StringUtils.splitByCharacterTypeCamelCase("ab de fg") = ["ab", " ", "de", " ", "fg"]
StringUtils.splitByCharacterTypeCamelCase("ab de fg") = ["ab", " ", "de", " ", "fg"]
StringUtils.splitByCharacterTypeCamelCase("ab:cd:ef") = ["ab", ":", "cd", ":", "ef"]
StringUtils.splitByCharacterTypeCamelCase("number5") = ["number", "5"]
StringUtils.splitByCharacterTypeCamelCase("fooBar") = ["foo", "Bar"]
StringUtils.splitByCharacterTypeCamelCase("foo200Bar") = ["foo", "200", "Bar"]
StringUtils.splitByCharacterTypeCamelCase("ASFRules") = ["ASF", "Rules"]
- Parameters:
str
- the String to split, may be null
- Returns:
- an array of parsed Strings,
null
if null String
input - Since:
- 2.4