Documentation ¶
Index ¶
- func AlphanumericNum(s string) int
- func AlphanumericNumRegExp(s string) int
- func AlphanumericNumV2(s string) int
- func Join(a any, sep string) string
- func JoinE(a any, sep string) (string, error)
- func JoinNonEmptyStrs(sep string, s ...string) string
- func Reverse(s string) string
- func Split(s, sep string) []string
- func SplitSeps(s string, seps ...string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlphanumericNum ¶
AlphanumericNum returns the alphanumeric number based on the ASCII code value. AlphanumericNum should be used first because it has a better performance than AlphanumericNumV2 and AlphanumericNumRegExp.
func AlphanumericNumRegExp ¶
AlphanumericNumRegExp returns the alphanumeric number based on regular expression. Note that this function has a poor performance when compared to AlphanumericNum, so the AlphanumericNum is recommended.
func AlphanumericNumV2 ¶
AlphanumericNumV2 returns the alphanumeric number based on the ASCII code value. Because range by rune so the performance is worse than AlphanumericNum.
func Join ¶
Join concatenates all elements of Array, Slice or String to a single string with a separator.
func JoinE ¶
JoinE concatenates all elements of Array, Slice or String to a single string with a separator and returns an error if an error occurred. E.g. input []int{1, 2, 3} and separator ",", output is a string "1,2,3". It panics if a's Kind is not Array, Slice, or String.
func JoinNonEmptyStrs ¶
JoinNonEmptyStrs concatenates multiple strings to a single string with the specified separator and skips the empty string.
Types ¶
This section is empty.