public class CaseRule extends Object
| Constructor and Description |
|---|
CaseRule() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isKebabCase(String text)
Check specifically for kebab case.
this-is-kebab-case-which-comes-from-lisp |
static boolean |
isLowerCamelCase(String text)
Check specifically for lower camel case.
thisIsLowerCamelCase |
static boolean |
isLowerCase(String text)
Check specifically for lower case.
this is lower case / thisisalsolowercase |
static boolean |
isSentenceCase(String text)
Check specifically for sentence case.
This is sentence case / It's first character of first word is capitalized |
static boolean |
isSnakeCase(String text)
Check specifically for snake case.
this_is_snake_case / which_is_used_a_lot_in_database_table_design |
static boolean |
isUpperCamelCase(String text)
Check specifically for upper camel case.
ThisIsUpperCamelCase |
static boolean |
isUpperCase(String text)
Check specifically for upper case.
THIS IS UPPER CASE / THISISALSOUPPERCASE |
static boolean |
validate(String text,
Kase pattern)
Check text with given format.
|
public static boolean validate(String text, Kase pattern)
text - The input stringpattern - The case format to acceptedpublic static boolean isUpperCamelCase(String text)
text - The input stringpublic static boolean isLowerCamelCase(String text)
text - The input stringpublic static boolean isUpperCase(String text)
text - The input stringpublic static boolean isLowerCase(String text)
text - The input stringpublic static boolean isKebabCase(String text)
text - The input stringpublic static boolean isSentenceCase(String text)
text - The input stringpublic static boolean isSnakeCase(String text)
text - The input stringCopyright © 2017. All rights reserved.