Documentation ¶
Overview ¶
Package gtbox_string 字符串处理
Index ¶
- func DelStringEndNewlines(s *string)
- func GTBytes2String(BytesData []byte) string
- func GTCheckMobile(phoneNumber string) bool
- func GTGBKString2UTF8String(src string) string
- func GTRecodingString(src string, srcCode string, toCode string) string
- func GTString2Bytes(strData string) []byte
- func GTStringSliceContain(slice []string, s string) bool
- func GTStruct2JsonString(value interface{}) (jsonString string)
- func GTUTF8String2GBKString(src string) string
- func GTValidHostnamePort(s string) bool
- func RandomString(n int) string
- func StringCoverBool(str string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DelStringEndNewlines ¶ added in v0.1.13
func DelStringEndNewlines(s *string)
DelStringEndNewlines 删除字符串结尾的 \n or \r\n
func GTGBKString2UTF8String ¶
GTGBKString2UTF8String GBK转UTF-8
func GTStringSliceContain ¶
GTStringSliceContain 判断是否包含元素
func GTStruct2JsonString ¶
func GTStruct2JsonString(value interface{}) (jsonString string)
GTStruct2JsonString struct转json
func GTUTF8String2GBKString ¶
GTUTF8String2GBKString UTF-8转GBK
func GTValidHostnamePort ¶
GTValidHostnamePort 检测IP+端口字符串是否正确
func RandomString ¶ added in v0.1.69
RandomString 获取随机字符串 n 多少位 比如获取10位随机数即传10
func StringCoverBool ¶ added in v0.1.69
StringCoverBool str value is true or false covert to golang bool type
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.