Documentation ¶
Index ¶
- func ArrayEqual(a, b []string, orderSensitive bool) bool
- func Contains(elements []string, toFind string) bool
- func CountByValue(elements []string, toFind string) int
- func CountDigit(s string) int
- func EndWith(s, toFind string) bool
- func Equal(s1, s2 []string) bool
- func EqualLower(s1, s2 string) bool
- func EqualUpper(s1, s2 string) bool
- func FindMaxLength(elements []string) []string
- func GetFirstLines(src string, count int) string
- func GetLastLines(src string, count int) string
- func GetLovelySmile() string
- func IndexAfter(s string, substr string, fromIndex int) int
- func IndexAfterUTF8(s string, substr string, fromIndex int) int
- func IndexAscii(s, substr string) int
- func IndexInArray(ss []string, tofind string) int
- func IndexUTF8(s, substr string) int
- func IsASCII(s string) bool
- func IsHexString(s string) bool
- func IsMd5String(s string) bool
- func LastIndexUTF8(s, substr string) int
- func LastSubstrByLenAscii(s string, length int) string
- func LastSubstrByLenUTF8(s string, length int) string
- func LenAscii(s string) int
- func LenUTF8(s string) int
- func Merge(elements1, elements2 []string) []string
- func OnlyFirstLetterUpperCase(s string) string
- func Prepend(slice []string, elems ...string) []string
- func RemoveByValue(elements []string, toRemove string) []string
- func RemoveByValues(elements, toRemove []string) []string
- func RemoveDuplicate(elements []string) []string
- func RemoveFirstLines(src string, count int) string
- func RemoveHead(s string, length int) string
- func RemoveLastLines(src string, count int) string
- func RemoveSpaces(elements []string) []string
- func RemoveTail(s string, length int) string
- func ReplaceWithTags(s string, begin string, endAfterBegin string, replaceStr string, ...) (string, error)
- func Shuffle(elements []string) []string
- func SortByHex(s string) string
- func SplitByLen(s string, length int) []string
- func SplitChunksAscii(s string, chunkSize int, fromLeft bool) []string
- func StartWith(s, toFind string) bool
- func StartWithRune(s, sub []rune) bool
- func SubstrAscii(s string, begin, end int) (string, error)
- func SubstrBetween(s string, begin string, end string, searchBeginFromLeft bool, ...) (string, error)
- func SubstrBetweenUTF8(s string, begin string, end string, searchBeginFromLeft bool, ...) (string, error)
- func SubstrByLenAscii(s string, length int) string
- func SubstrByLenUTF8(s string, length int) string
- func ToLower(elements []string) []string
- func ToUpper(elements []string) []string
- func TrimLeftAll(s, cutset string) string
- func TrimRightAll(s, cutset string) string
- func TrimUnASCII(s string) string
- func TrySubstrLenAscii(s string, begin, length int) string
- func TrySubstrLenUTF8(s string, begin, length int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayEqual ¶
func CountByValue ¶
func EqualLower ¶
func EqualUpper ¶
func FindMaxLength ¶
func GetFirstLines ¶
func GetLastLines ¶
func GetLovelySmile ¶
func GetLovelySmile() string
func IndexAfter ¶
Find index of sep string in src string, and start searching from given index - fromIndex Sample: IndexAfter("01234567893", "3", 5) = 10
func IndexInArray ¶
func IsMd5String ¶
func LastIndexUTF8 ¶
func LastSubstrByLenAscii ¶
func LastSubstrByLenUTF8 ¶
func RemoveByValue ¶
func RemoveByValues ¶
func RemoveDuplicate ¶
func RemoveFirstLines ¶
func RemoveHead ¶
func RemoveLastLines ¶
func RemoveSpaces ¶
func RemoveTail ¶
func ReplaceWithTags ¶
func SplitByLen ¶
func SplitChunksAscii ¶
SplitChunks("1234567", 3, false) == "1 234 567"
func SubstrAscii ¶
以字节为单元的Substr函数 如果包含中文等UTF8字符,则不可以使用此函数
func SubstrBetween ¶
func SubstrBetween(s string, begin string, end string, searchBeginFromLeft bool, searchEndFromLeft bool, includBegin bool, includEnd bool) (string, error)
Get substring of source string sample: SubstrAscii("ab)cd(efgh)ij)kl", "(", ")", true, true, true, true) == "efgh"
func SubstrBetweenUTF8 ¶
func SubstrByLenUTF8 ¶
func TrimLeftAll ¶
trim s until s doesn't start with cutset
func TrimRightAll ¶
trim s until s doesn't end with cutset
func TrimUnASCII ¶
func TrySubstrLenAscii ¶
以字节为单元的Substr函数 如果begine、length过大过小,都不会报错
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.