Documentation
¶
Index ¶
- Constants
- func Compare(s1, s2 string) int
- func IsAllCharsIn(s, encoding string) bool
- func JoinInt(v []int, sep string) string
- func JoinUint(v []uint, sep string) string
- func LastIndexByte(s string, b byte) int
- func MidIndex(s string, sep byte) int
- func RemoveSpace(s string) string
- func RepeatJoin(s, sep string, count int) string
- func Seperate(s string, sep byte) (string, string)
- func SplitAtLastN(str, sep string, n int) (index int)
- func SplitAtN(str, sep string, n int) (index int)
- 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 string, delimiter string) string
- func TrimLower(str string) string
- func TrimQuote(str string) (string, error)
- func TrimSplit(s, sep string) []string
- func TrimUpper(str string) string
Constants ¶
const ErrQuoteNotMatch = errors.Err("Quote don't match")
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 IsAllCharsIn ¶
IsAllCharsIn check whether all chars of string is in encoding string
func LastIndexByte ¶
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 SplitAtLastN ¶
SplitAtLastN find last index of n-th sep 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
Types ¶
This section is empty.