Documentation
¶
Index ¶
- func CmpFoldFast(s1, s2 string) bool
- func CmpFoldSafe(s1, s2 string) bool
- func CutHeader(header string) (value, params string)
- func CutParams(header string) (params string)
- func IsASCIINonprintable(c byte) bool
- func IsURLUnsafeChar(c byte) bool
- func LStripWS(str string) string
- func NormalizeAddress(addr string) string
- func ParseQualifier(q string) int
- func URLDecode(str string) (string, bool)
- func Unquote(str string) string
- func WalkKV(data string) iter.Seq2[string, string]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CmpFoldFast ¶ added in v0.17.2
CmpFoldFast compares two strings in a case-insensitive manner. Works significantly faster than CmpFoldSafe, especially on longer strings
func CmpFoldSafe ¶ added in v0.17.2
CmpFoldSafe compares two strings in a case-insensitive manner without relying on bitwise lowercasing.
func CutParams ¶
CutParams behaves exactly as strings.Cut, but strips whitespaces between value and the first-encountered parameter in addition.
func IsASCIINonprintable ¶ added in v0.17.3
func IsURLUnsafeChar ¶ added in v0.17.3
IsURLUnsafeChar tells whether it's safe to decode an urlencoded character.
func NormalizeAddress ¶
func ParseQualifier ¶ added in v0.17.3
ParseQualifier returns an int in range [0, 10] representing the qualifier value. All values below the 0.1 resolution are ignored. Invalid values result in 0. But keep in mind that 0 is also a valid value.
Types ¶
This section is empty.