mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-17 20:50:44 +00:00
CE-1955 Replace _ with space in allCapsToMixedCase (for common use-case of an enum constant)
This commit is contained in:
@ -82,7 +82,7 @@ public class StringUtils
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
** allCapsToMixedCase - ie, UNIT CODE -> Unit Code
|
||||
** allCapsToMixedCase - ie, UNIT_CODE -> Unit Code
|
||||
**
|
||||
** @param input
|
||||
** @return
|
||||
@ -127,7 +127,7 @@ public class StringUtils
|
||||
return (input);
|
||||
}
|
||||
|
||||
return (rs.toString());
|
||||
return (rs.toString().replace('_', ' '));
|
||||
}
|
||||
|
||||
|
||||
|
@ -105,6 +105,7 @@ class StringUtilsTest extends BaseTest
|
||||
assertEquals("Foo bar", StringUtils.allCapsToMixedCase("FOo bar"));
|
||||
assertEquals("Foo Bar", StringUtils.allCapsToMixedCase("FOo BAr"));
|
||||
assertEquals("foo bar", StringUtils.allCapsToMixedCase("foo bar"));
|
||||
assertEquals("Foo Bar", StringUtils.allCapsToMixedCase("FOO_BAR"));
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user