Documentation
¶
Index ¶
- Variables
- func ContainHan(str string) bool
- func LStrip(str string, characterMask ...string) string
- func NonceStr() string
- func RStrip(str string, characterMask ...string) string
- func Reverse(s string) string
- func StringOrEmpty(s *string) string
- func Strip(str string, characterMask ...string) string
- func ToBool(s string, fn ...func(s string) bool) bool
- func ToFloat[T constraints.Float](s string, missing T) T
- func ToInteger[T constraints.Integer](s string, missing T) T
- func Trim(str string, characterMask ...string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultTrimChars = string([]byte{
'\t',
'\v',
'\n',
'\r',
'\f',
' ',
0x00,
0x85,
0xA0,
})
DefaultTrimChars are the characters which are stripped by Trim* functions in default.
Functions ¶
func ContainHan ¶
func LStrip ¶
LStrip strips whitespace (or other characters) from the beginning and end of a string. The optional parameter `characterMask` specifies the additional stripped characters.
func RStrip ¶
RStrip RTrim strips whitespace (or other characters) from the beginning and end of a string. The optional parameter `characterMask` specifies the additional stripped characters.
func StringOrEmpty ¶
func Strip ¶
Strip strips whitespace (or other characters) from the beginning and end of a string. The optional parameter `characterMask` specifies the additional stripped characters.
func ToFloat ¶
func ToFloat[T constraints.Float](s string, missing T) T
func ToInteger ¶
func ToInteger[T constraints.Integer](s string, missing T) T
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.