Documentation ¶
Overview ¶
Package string is a collection of small reusable Go functions
Index ¶
- func Capitalize(str string) string
- func CapitalizeTitle(input string, omitWords ...[]string) string
- func CaseInsensitiveEquals(firstString, secondString string) bool
- func DeleteWhitespace(str string) string
- func GetMD5Hash(text string) string
- func Humanize(inputStr string) string
- func IndexOf(inputStr string, substring string) int
- func IsBlank(inputStr string) bool
- func IsBoolean(inputStr string) bool
- func IsEmpty(inputStr string) bool
- func IsEmptyOrBlank(inputStr string) bool
- func IsFloat(inputStr string) bool
- func IsInteger(inputStr string) bool
- func LowerCamelCase(inputStr string) (outputString string)
- func RemoveAccents(s string) string
- func ToKebabCase(s string) string
- func ToSnakeCase(s string) string
- func Truncate(inputStr string, length int) string
- func UnifyWordSeries(words []string, conjunction string) string
- func UpperCamelCase(inputStr string) (outputString string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CapitalizeTitle ¶
Capitalizes string excluding words such as "and", "a", "with", "or". You can provide an optional string slice with words that will be excluded too
func CaseInsensitiveEquals ¶
Return true if both strings are case insensitive equal
func DeleteWhitespace ¶
Deletes all whitespaces from a String
func IsEmptyOrBlank ¶
Returns true if string is empty or blank
func LowerCamelCase ¶
Convert string to lowerCamelCase
func RemoveAccents ¶
Removes the accents from a string, converting them to their non-accented corresponding characters.
func UnifyWordSeries ¶
Transforms a list of words into a word series, returning a string containing all words separated by commas and the conjunction
func UpperCamelCase ¶
Convert string to UpperCamelCase
Types ¶
This section is empty.