Documentation
¶
Overview ¶
Package textutil parses loosely written configuration values and lists and normalizes line endings.
Index ¶
- func ContainsFold(s, substr string) bool
- func ExtendArrs(arrays ...*[]string) int
- func GetIntNoErrByStr(str string) int
- func GetTimeNoErrByStr(str string) time.Time
- func HandleArrEmptyVal(list []string) []string
- func NormalizeNewlines(s string) string
- func ParseBool(s string) (bool, error)
- func SplitLines(s string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsFold ¶
func ExtendArrs ¶
func HandleArrEmptyVal ¶
func NormalizeNewlines ¶
NormalizeNewlines turns the line endings of s, \r\n (Windows), \r (classic Mac) and \n (Unix), into \n, and drops a byte order mark at the start.
func ParseBool ¶
ParseBool parses a boolean config value the way strconv.ParseBool does, ignoring surrounding space: 1, t, T, TRUE, true, True and their false counterparts. Any other value yields false and an error for the caller to report.
func SplitLines ¶
SplitLines splits s into lines ending in \r\n, \r or \n.
Types ¶
This section is empty.