Documentation ¶
Index ¶
- func Compare(s1, s2 string) int
- func Filter(matcher func(string) bool, strings ...string) []string
- func IndexN(str, sep string, n int) (index int)
- func IndexNonSpace(s string) int
- func IsAllCharsIn(s, encoding string) bool
- func IsEmpty(s string) bool
- func IsNotEmpty(s string) bool
- func JoinInt(v []int, sep string) string
- func JoinUint(v []uint, sep string) string
- func LastIndexByte(s string, b byte) int
- func LastIndexN(str, sep string, n int) (index int)
- func LastIndexNonSpace(s string) int
- func Map(mapper func(string) string, strings ...string) []string
- func MergeSpace(s string, trim bool) string
- func MidIndex(s string, sep byte) int
- func NumMatched(matcher func(string) bool, strings ...string) int
- func RemoveSpace(s string) string
- func RepeatJoin(s, sep string, count int) string
- func Seperate(s string, sep byte) (string, string)
- func SplitAndTrim(s, sep string) []string
- func SuffixJoin(s []string, suffix, sep string) string
- func ToAbridge(str string) string
- func ToCamel(s string) string
- func ToLowerAbridge(str string) (s string)
- func ToSnake(s string) string
- func TrimAfter(s, delimiter string) string
- func TrimAndToLower(str string) string
- func TrimAndToUpper(str string) string
- func TrimBefore(s, delimeter string) string
- func TrimQuote(str string) (string, bool)
- func TrimWrap(str, left, right string, strict bool) (string, bool)
- func WriteStringsToBuffer(buffer *bytes.Buffer, strings []string, sep string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compare ¶
Compare compare two string, if equal, 0 was returned, if s1 > s2, 1 was returned, otherwise -1 was returned
func IndexNonSpace ¶
IndexNonSpace find index of first non-space character, if not exist, -1 was returned
func IsAllCharsIn ¶
IsAllCharsIn check whether all chars of string is in encoding string
func IsNotEmpty ¶
func LastIndexByte ¶
func LastIndexN ¶
LastIndexN find last index of n-th sep string
func LastIndexNonSpace ¶
LastIndexNonSpace find index of last non-space character, if not exist, -1 was returned
func MergeSpace ¶
MergeSpace merge mutiple space to one, trim determin whether remove space at prefix and suffix
func NumMatched ¶
NumMatched return number of strings matched by matcher
func RemoveSpace ¶
RemoveSpace remove all space characters from string by unibyte.IsSpace
func RepeatJoin ¶
RepeatJoin repeat s count times as a string slice, then join with sep
func Seperate ¶
Seperate string by seperator, the seperator must in the middle of string, not first and last
func SplitAndTrim ¶
TrimSplit split string and return trim space string
func SuffixJoin ¶
SuffixJoin join string slice with suffix
func ToAbridge ¶
ToAbridge extract first letter and all upper case letter from string as it's abridge case
func ToCamel ¶
ToCamel string, xx_yy to XxYy, xx__yy to Xx_Yy xx _yy to Xx Yy, the rule is that a lower case letter after '_' will combine to a upper case letter
func ToLowerAbridge ¶
ToLowerAbridge extract first letter and all upper case letter from string as it's abridge case, and convert it to lower case
func TrimAndToLower ¶
TrimAndToLower return the trim and lower format of a string
func TrimAndToUpper ¶
TrimAndToUpper return the trim and upper format of a string
func TrimBefore ¶
Types ¶
This section is empty.