Documentation ¶
Overview ¶
Package lysstring contains string functions.
Index ¶
- func ContainsAny(slice []string, elements []string) bool
- func Convert(s, inSep, outSep string, f func(string) string) (res string)
- func DeAlias[T ~string](in []T) (out []string)
- func IsAscii(s string) bool
- func RandString(n int) string
- func RemoveCharacters(input string, charsToRemove string) string
- func ReplaceAccents(s string) (res string, err error)
- func Title(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsAny ¶
ContainsAny returns true if any string in elements is found in slice
func IsAscii ¶ added in v0.1.23
IsAscii returns true if s only contains ASCII chars from https://stackoverflow.com/questions/53069040/checking-a-string-contains-only-ascii-characters
func RandString ¶
RandString creates a random string from https://stackoverflow.com/questions/22892120/how-to-generate-a-random-string-of-a-fixed-length-in-go
func RemoveCharacters ¶ added in v0.1.14
RemoveCharacters returns input with the chars in charsToRemove removed from https://socketloop.com/tutorials/golang-remove-characters-from-string-example
func ReplaceAccents ¶ added in v0.1.23
ReplaceAccents replaces accent characters such as "ö" with their non-accented equivalents such as "o" from https://twin.sh/articles/33/remove-accents-from-characters-in-go
Types ¶
This section is empty.