Class StringCase
java.lang.Object
com.github.sttk.stringcase.StringCase
Is the class that provides the static methods to convert a string to following cases.
- camelCase
- COBOL-CASE
- kebab-case
- MACRO_CASE
- PascalCase
- snake_case
- Train-Case
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Converts the input string to camel case.static String
camelCaseWithKeep
(String input, String kept) Deprecated.static String
camelCaseWithOptions
(String input, Options opts) Converts the input string to camel case with the specified options.static String
camelCaseWithSep
(String input, String seps) Deprecated.Should usecamelCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadstatic String
Converts the input string to cobol case.static String
cobolCaseWithKeep
(String input, String kept) Deprecated.Should usecobolCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadstatic String
cobolCaseWithOptions
(String input, Options opts) Converts the input string to cobol case with the specified options.static String
cobolCaseWithSep
(String input, String seps) Deprecated.Should usecobolCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadstatic String
Converts the input string to kebab case.static String
kebabCaseWithKeep
(String input, String kept) Deprecated.Should usekebabCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadstatic String
kebabCaseWithOptions
(String input, Options opts) Converts the input string to kebab case with the specified options.static String
kebabCaseWithSep
(String input, String seps) Deprecated.Should usekebabCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadstatic String
Converts the input string to macro case.static String
macroCaseWithKeep
(String input, String kept) Deprecated.Should usemacroCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadstatic String
macroCaseWithOptions
(String input, Options opts) Converts the input string to macro case with the specified options.static String
macroCaseWithSep
(String input, String seps) Deprecated.Should usemacroCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadstatic String
pascalCase
(String input) Converts the input string to pascal case.static String
pascalCaseWithKeep
(String input, String kept) Deprecated.Should usepascalCaseWithOptions(java.lang.String,com.github.sttk.stringcase.Options)
insteadstatic String
pascalCaseWithOptions
(String input, Options opts) Converts the input string to pascal case with the specified options.static String
pascalCaseWithSep
(String input, String seps) Deprecated.Should usepascalCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadstatic String
Converts the input string to snake case.static String
snakeCaseWithKeep
(String input, String kept) Deprecated.Should usesnakeCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadstatic String
snakeCaseWithOptions
(String input, Options opts) Converts the input string to snake case with the specified options.static String
snakeCaseWithSep
(String input, String seps) Deprecated.Should usesnakeCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadstatic String
Converts the input string to train case.static String
trainCaseWithKeep
(String input, String kept) Deprecated.Should usetrainCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadstatic String
trainCaseWithOptions
(String input, Options opts) Converts the input string to train case with the specified options.static String
trainCaseWithSep
(String input, String seps) Deprecated.Should usetrainCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
instead
-
Method Details
-
camelCaseWithOptions
-
camelCase
-
camelCaseWithSep
Deprecated.Should usecamelCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadConverts the input string to camel case with the specified separator characters.- Parameters:
input
- The input string.seps
- The symbol characters to be treated as separators.- Returns:
- A string converted to camel case.
-
camelCaseWithKeep
Deprecated.Should usecamelCaseWithOptions(java.lang.String,com.github.sttk.stringcase.Options)
insteadConverts the input string to camel case with the specified characters to be kept.- Parameters:
input
- The input string.kept
- The symbol characters not to be treated as separators.- Returns:
- A string converted to camel case.
-
cobolCaseWithOptions
-
cobolCase
-
cobolCaseWithSep
Deprecated.Should usecobolCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadConverts the input string to cobol case with the specified separator characters.- Parameters:
input
- The input string.seps
- The symbol characters to be treated as separators.- Returns:
- A string converted to cobol case.
-
cobolCaseWithKeep
Deprecated.Should usecobolCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadConverts the input string to cobol case with the specified characters to be kept.- Parameters:
input
- The input string.kept
- The symbol characters not to be treated as separators.- Returns:
- A string converted to cobol case.
-
kebabCaseWithOptions
-
kebabCase
-
kebabCaseWithSep
Deprecated.Should usekebabCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadConverts the input string to kebab case with the specified separator characters.- Parameters:
input
- The input string.seps
- The symbol characters to be treated as separators.- Returns:
- A string converted to kebab case.
-
kebabCaseWithKeep
Deprecated.Should usekebabCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadConverts the input string to kebab case with the specified characters to be kept.- Parameters:
input
- The input string.kept
- The symbol characters not to be treated as separators.- Returns:
- A string converted to kebab case.
-
macroCaseWithOptions
-
macroCase
-
macroCaseWithSep
Deprecated.Should usemacroCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadConverts the input string to macro case with the specified separator characters.- Parameters:
input
- The input string.seps
- The symbol characters to be treated as separators.- Returns:
- A string converted to macro case.
-
macroCaseWithKeep
Deprecated.Should usemacroCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadConverts the input string to macro case with the specified characters to be kept.- Parameters:
input
- The input string.kept
- The symbol characters not to be treated as separators.- Returns:
- A string converted to macro case.
-
pascalCaseWithOptions
-
pascalCase
-
pascalCaseWithSep
Deprecated.Should usepascalCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadConverts the input string to pascal case with the specified separator characters.- Parameters:
input
- The input string.seps
- The symbol characters to be treated as separators.- Returns:
- A string converted to pascal case.
-
pascalCaseWithKeep
Deprecated.Should usepascalCaseWithOptions(java.lang.String,com.github.sttk.stringcase.Options)
insteadConverts the input string to pascal case with the specified characters to be kept.- Parameters:
input
- The input string.kept
- The symbol characters not to be treated as separators.- Returns:
- A string converted to pascal case.
-
snakeCaseWithOptions
-
snakeCase
-
snakeCaseWithSep
Deprecated.Should usesnakeCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadConverts the input string to snake case with the specified separator characters.- Parameters:
input
- The input string.seps
- The symbol characters to be treated as separators.- Returns:
- A string converted to snake case.
-
snakeCaseWithKeep
Deprecated.Should usesnakeCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadConverts the input string to snake case with the specified characters to be kept.- Parameters:
input
- The input string.kept
- The symbol characters not to be treated as separators.- Returns:
- A string converted to snake case.
-
trainCaseWithOptions
-
trainCase
-
trainCaseWithSep
Deprecated.Should usetrainCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadConverts the input string to train case with the specified separator characters.- Parameters:
input
- The input string.seps
- The symbol characters to be treated as separators.- Returns:
- A string converted to train case.
-
trainCaseWithKeep
Deprecated.Should usetrainCaseWithOptions(java.lang.String, com.github.sttk.stringcase.Options)
insteadConverts the input string to train case with the specified characters to be kept.- Parameters:
input
- The input string.kept
- The symbol characters not to be treated as separators.- Returns:
- A string converted to train case.
-
camelCaseWithOptions(java.lang.String,com.github.sttk.stringcase.Options)
instead