Documentation ¶
Overview ¶
DEPRECATED. use gstrconv package instead
Index ¶
- Constants
- func Atoi(s string) (i int)
- func Atoi64(s string) (rs int64)
- func LenUtf8(s string) (n int)
- func Md5(text string) string
- func Md5FromBytes(data []byte) string
- func ParseDigitFromMixed(s string) (i int)
- func ParseFloat32(s string) (i float32)
- func RemoveHtmlTag(s string) (rs string)
- func Sha1(s string) (rs string)
- func Sha1FromBytes(data []byte) (rs string)
- func Shorten(s string, n int) (rs string)
- func ShortenWith(s string, n int, suffix string) (rs string)
- func StrInSlice(haystack []string, needle string) bool
- func Substring(s string, start int, end int) string
- func TrimSubstrings(haystack string, needles []string) (result string)
Constants ¶
const (
DefaultShortenSuffix = "…"
)
Variables ¶
This section is empty.
Functions ¶
func Atoi64 ¶ added in v0.0.3
DEPRECATED. use gstrconv package instead Atoi64 parses a string into int64.
func Md5FromBytes ¶ added in v0.0.8
Md5FromBytes hashes a slice of bytes in md5 algorithm.
func ParseDigitFromMixed ¶ added in v0.0.3
DEPRECATED. use gstrconv package instead ParseDigitFromMixed parses a digit from a string contains 0-9 and non 0-9 chars.
func ParseFloat32 ¶ added in v0.0.3
DEPRECATED. use gstrconv package instead ParseFloat32 parses a string into float32.
func RemoveHtmlTag ¶ added in v0.0.5
func Sha1FromBytes ¶ added in v0.0.8
Sha1FromBytes hashes a slice of bytes in sha1 algorithm.
func Shorten ¶
Shorten it cuts and concatenates a part of string with ellipsis if its length long than maxLen in unicode.
func StrInSlice ¶
func Substring ¶ added in v0.0.3
https://stackoverflow.com/questions/28718682/how-to-get-a-substring-from-a-string-of-runes-in-golang
func TrimSubstrings ¶
TrimSubstrings remove all needles item from haystack.
Types ¶
This section is empty.