public class CaseSwitcher extends Object
A naming conversion tool. - Consecutive capitalization is treated as a word, such as ID, which is treated as id - `_.-` is strong delimiter char - `Single capitals` are weak delimiter char - When there is a strong delimiter, the weak delimiter is invalid
| Modifier and Type | Class and Description |
|---|---|
static class |
CaseSwitcher.Case |
| Constructor and Description |
|---|
CaseSwitcher() |
| Modifier and Type | Method and Description |
|---|---|
static @NotNull String |
camel(CharSequence str)
camelCase
|
static @NotNull String |
dot(CharSequence str)
dot.case
|
static @NotNull String |
kebab(CharSequence str)
kebab-case
|
static @NotNull String |
pascal(CharSequence str)
PascalCase
|
static @NotNull String |
scream(CharSequence str)
SCREAMING_SNAKE
|
static @NotNull String |
snake(CharSequence str)
snake_case
|
static @NotNull String |
toCase(CaseSwitcher.Case cas,
CharSequence str) |
@NotNull public static @NotNull String toCase(CaseSwitcher.Case cas, CharSequence str)
@NotNull public static @NotNull String kebab(CharSequence str)
@NotNull public static @NotNull String snake(CharSequence str)
@NotNull public static @NotNull String camel(CharSequence str)
@NotNull public static @NotNull String pascal(CharSequence str)
@NotNull public static @NotNull String dot(CharSequence str)
@NotNull public static @NotNull String scream(CharSequence str)
Copyright © 2023. All rights reserved.