Fix bug in humaniseCamelCase.
This commit is contained in:
parent
7605dacb8a
commit
1dedb13dc9
@ -399,7 +399,7 @@ public final class StringTools {
|
||||
* @return Readable String representation of input word
|
||||
*/
|
||||
public static String humaniseCamelCase(final String word) {
|
||||
Pattern pattern = Pattern.compile("([A-Z]|[a-z])[a-z]*");
|
||||
Pattern pattern = Pattern.compile("([A-Z]|[a-z])[a-z0-9]*");
|
||||
|
||||
List<String> tokens = new ArrayList<>();
|
||||
Matcher matcher = pattern.matcher(word);
|
||||
|
@ -37,6 +37,8 @@ public class StringToolsTest {
|
||||
map.put("thisIsAwesome", "This Is Awesome");
|
||||
map.put("THQIsNice", "THQ Is Nice");
|
||||
map.put("iLikeABC", "I Like ABC");
|
||||
map.put("foo2Bar", "Foo2 Bar");
|
||||
map.put("phi1", "Phi1");
|
||||
|
||||
String key, value;
|
||||
for (Object o : map.entrySet()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user