Documentation
¶
Overview ¶
Package strings provides some string functions.
Index ¶
- func JustifyLeft(s string, maxLen int, pad rune) string
- func Length(s string) int
- func NormalizeWords(s string) (result []string)
- func Slugify(s string) string
- func SplitLineSeq(s string) iter.Seq[string]
- func SplitLines(s string) []string
- func SplitWordSeq(s string) iter.Seq[string]
- func SplitWords(text string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func JustifyLeft ¶
JustifyLeft ensures that the string has a defined length.
func NormalizeWords ¶
NormalizeWords produces a word list that is normalized for better searching.
func Slugify ¶
Slugify returns a string that can be used as part of an URL
func SplitLineSeq ¶
SplitLineSeq returns an iterator over all lines in the given string.
func SplitLines ¶
SplitLines splits the given string into a list of lines.
func SplitWordSeq ¶
SplitWordSeq returns an iterator over all words, i.e. string that were separated by control character, space characters, or separator characters.
Types ¶
This section is empty.
Source Files
¶
- slugify.go
- strings.go
Click to show internal directories.
Click to hide internal directories.