Class CaseFormatUtils
java.lang.Object
org.assertj.core.util.introspection.CaseFormatUtils
Utility class for conversion between different case formats
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static String
adjustWordCase
(String s, boolean firstLetterUpperCased) private static boolean
static String
Converts an input string into camelCase.
-
Field Details
-
WORD_SEPARATOR_REGEX
- See Also:
-
-
Constructor Details
-
CaseFormatUtils
private CaseFormatUtils()
-
-
Method Details
-
toCamelCase
Converts an input string into camelCase.The input string may use any of the well known case styles: Pascal, Snake, Kebab or even Camel. Already camelCased strings will be returned as is. Mix and match is also an option; the algorithm will try its best to give an acceptable answer. Mixed case will be preserved, i.e
assertThat(toCamelCase("miXedCAse")).isEqualTo("miXedCAse")
- Parameters:
s
- the string to be converted- Returns:
- the input string converted to camelCase
-
extractWords
-
adjustWordCase
-
isAllCaps
-