Documentation ¶
Overview ¶
Package utils provides some utility functions for internal usage.
Index ¶
- func EqualFoldWithoutChars(s1, s2 string) bool
- func IsArray(value interface{}) bool
- func IsLetter(b byte) bool
- func IsLetterLower(b byte) bool
- func IsLetterUpper(b byte) bool
- func IsNumeric(s string) bool
- func ReplaceByMap(origin string, replaces map[string]string) string
- func UcFirst(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualFoldWithoutChars ¶ added in v1.12.2
EqualFoldWithoutChars checks string <s1> and <s2> equal case-insensitively, with/without chars '-'/'_'/'.'/' '.
func IsArray ¶
func IsArray(value interface{}) bool
IsArray checks whether given value is array/slice. Note that it uses reflect internally implementing this feature.
func IsLetterLower ¶
IsLetterLower checks whether the given byte b is in lower case.
func IsLetterUpper ¶
IsLetterUpper checks whether the given byte b is in upper case.
func IsNumeric ¶
IsNumeric checks whether the given string s is numeric. Note that float string like "123.456" is also numeric.
func ReplaceByMap ¶
ReplaceByMap returns a copy of <origin>, which is replaced by a map in unordered way, case-sensitively.
Types ¶
This section is empty.