Documentation
¶
Index ¶
- type Text
- func (t *Text) CamelCaseLower() *Text
- func (t *Text) CamelCaseUpper() *Text
- func (t *Text) RemoveTilde() *Text
- func (t *Text) String() string
- func (t *Text) ToLower() *Text
- func (t *Text) ToSnakeCaseLower(sep ...string) *Text
- func (t *Text) ToSnakeCaseUpper(sep ...string) *Text
- func (t *Text) ToUpper() *Text
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Text ¶
type Text struct {
// contains filtered or unexported fields
}
Text struct to store the content of the text
func (*Text) CamelCaseLower ¶
converts text to camelCase (first word lowercase) eg: "Hello world" -> "helloWorld"
func (*Text) CamelCaseUpper ¶
converts text to PascalCase (all words capitalized) eg: "hello world" -> "HelloWorld"
func (*Text) ToSnakeCaseLower ¶
snakeCase converts a string to snake_case format with optional separator. If no separator is provided, underscore "_" is used as default. Example:
Input: "camelCase" -> Output: "camel_case" Input: "PascalCase", "-" -> Output: "pascal-case" Input: "APIResponse" -> Output: "api_response" Input: "user123Name", "." -> Output: "user123.name"
ToSnakeCaseLower converts text to snake_case format
func (*Text) ToSnakeCaseUpper ¶
ToSnakeCaseUpper converts text to Snake_Case format
Click to show internal directories.
Click to hide internal directories.