Documentation
¶
Overview ¶
Package anycase converts strings to various cases. See the conversion table below: | Function | Result | | ----------------------------------------- | -------------------- | | `ToSnake(s)` | `any_kind_of_string` | | `ToSnakeAndIgnore(s, '.')` | `any_kind.of_string` | | `ToSnakeUppercase(s)` | `ANY_KIND_OF_STRING` | | `ToKebab(s)` | `any-kind-of-string` | | `ToKebabUppercase(s)` | `ANY-KIND-OF-STRING` | | `ToCamel(s)` | `AnyKindOfString` | | `ToLowerCamel(s)` | `anyKindOfString` | | `ToDelimited(s, '.')` | `any.kind.of.string` | | `ToDelimitedUppercase(s, '.', ' ', true)` | `ANY.KIND OF.STRING` | | `ToDelimitedUppercase(s, '.', ”, true)` | `ANY.KIND.OF.STRING` |
Index ¶
- func ToCamel(s string) string
- func ToDelimited(s string, delimiter uint8) string
- func ToDelimitedUppercase(s string, delimiter uint8, ignore uint8, uppercase bool) string
- func ToKebab(s string) string
- func ToKebabUppercase(s string) string
- func ToLowerCamel(s string) string
- func ToSnake(s string) string
- func ToSnakeAndIgnore(s string, ignore uint8) string
- func ToSnakeUppercase(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToDelimited ¶
ToDelimited converts a string to delimited.snake.case (in this case `delimiter = '.'`)
func ToDelimitedUppercase ¶
ToDelimitedUppercase converts a string to UPPERCASE.DELIMITED.SNAKE.CASE (in this case `delimiter = '.'; uppercase = true`) or delimited.snake.case (in this case `delimiter = '.'; uppercase = false`)
func ToKebabUppercase ¶
ToKebabUppercase converts a string to UPPERCASE-KEBAB-CASE
func ToLowerCamel ¶
ToLowerCamel converts a string to lowerCamelCase
func ToSnakeAndIgnore ¶
ToSnakeAndIgnore converts to snake_case and ignores the following characters arg
func ToSnakeUppercase ¶
ToSnakeUppercase converts a string to UPPERCASE_SNAKE_CASE
Types ¶
This section is empty.