Documentation ¶
Index ¶
- func After(value string, a string) (string, error)
- func Before(value string, a string) (string, error)
- func Between(value string, a string, b string) (string, error)
- func ContainsAny(s string, ss ...string) bool
- func EqualFoldAny(s string, ss ...string) bool
- func HasPrefixAny(s string, prefixes ...string) bool
- func HasPrefixI(s, prefix string) bool
- func HasSuffixAny(s string, suffixes ...string) bool
- func HasSuffixI(s, suffix string) bool
- func IndexAt(s, sep string, n int) int
- func Join(elems []interface{}, sep string) string
- func ReplaceAll(s, new string, olds ...string) string
- func Reverse(s string) string
- func SlideWithLength(s string, l int) chan string
- func SplitAny(s string, seps ...string) []string
- func TrimPrefixAny(s string, prefixes ...string) string
- func TrimSuffixAny(s string, suffixes ...string) string
- func Truncate(data string, maxSize int) string
- type LongestSequence
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func After ¶
After extracts the string after a from value returns value as is and error if a is not found
func Before ¶
Before extracts the string before a from value returns value as is and error if a is not found
func Between ¶
Between extracts the string between a and b returns value as is and error if a or b are not found
func ContainsAny ¶
ContainsAny returns true is s contains any specified substring
func EqualFoldAny ¶
EqualFoldAny returns true if s is equal to any specified substring
func HasPrefixAny ¶
HasPrefixAny checks if the string starts with any specified prefix
func HasSuffixAny ¶
HasSuffixAny checks if the string ends with any specified suffix
func Join ¶
Join concatenates the elements of its first argument to create a single string. The separator string sep is placed between elements in the resulting string.
func ReplaceAll ¶
ReplaceAll returns a copy of the string s with all instances of old incrementally replaced by new.
func SlideWithLength ¶
SlideWithLength returns all the strings of the specified length while moving forward the extraction window
func TrimPrefixAny ¶
TrimPrefixAny trims all prefixes from string in order
func TrimSuffixAny ¶
TrimSuffixAny trims all suffixes from string in order
Types ¶
type LongestSequence ¶
func LongestRepeatingSequence ¶
func LongestRepeatingSequence(s string) LongestSequence
LongestRepeatingSequence finds the longest repeating non-overlapping sequence in a string