Documentation ¶
Overview ¶
Package strutil implements some functions to manipulate string.
Index ¶
- func After(s, char string) string
- func AfterLast(s, char string) string
- func Before(s, char string) string
- func BeforeLast(s, char string) string
- func CamelCase(s string) string
- func Capitalize(s string) string
- func IsString(v interface{}) bool
- func KebabCase(s string) string
- func LowerFirst(s string) string
- func PadEnd(source string, size int, padStr string) string
- func PadStart(source string, size int, padStr string) string
- func ReverseStr(s string) string
- func SnakeCase(s string) string
- func Unwrap(str string, wrapToken string) string
- func Wrap(str string, wrapWith string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BeforeLast ¶
BeforeLast create substring in source string before position when char last appear
func Capitalize ¶
Capitalize converts the first character of a string to upper case and the remaining to lower case.
func IsString ¶
func IsString(v interface{}) bool
IsString check if the value data type is string or not.
func LowerFirst ¶
LowerFirst converts the first character of string to lower case.
func PadEnd ¶
PadEnd pads string on the right side if it's shorter than size. Padding characters are truncated if they exceed size.
func PadStart ¶
PadStart pads string on the left side if it's shorter than size. Padding characters are truncated if they exceed size.
func ReverseStr ¶
ReverseStr return string whose char order is reversed to the given string
Types ¶
This section is empty.