Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToTitleOrUpper ¶
ToTitleOrUpper converts the input string to title case or upper case based on its content. If the string contains more uppercase characters than lowercase characters, it converts the entire string to uppercase. Otherwise, it converts the string to title case.
Example:
ToTitleOrUpper("hello WORLD") // returns "HELLO WORLD"
ToTitleOrUpper("hello world") // returns "Hello World"
Types ¶
type Formatter ¶
type Formatter[T ~string] struct { // contains filtered or unexported fields }
func NewFormatter ¶
func (*Formatter[T]) RemoveSpaces ¶
func (*Formatter[T]) TrimSpaces ¶
Click to show internal directories.
Click to hide internal directories.