This commit is contained in:
hoteas 2017-10-30 09:54:54 +00:00
parent cf8ba558ca
commit e99c726e26

View File

@ -238,6 +238,22 @@ func ObjToStr(obj interface{}) string {
return str return str
} }
//转换为Map
func StrToMap(string string) Map {
data := Map{}
data.JsonToMap(string)
return data
}
//转换为Slice
func StrToSlice(string string) Slice {
data := Slice{}
data.JsonToSlice(string)
return data
}
//字符串数组: a1,a2,a3转["a1","a2","a3"] //字符串数组: a1,a2,a3转["a1","a2","a3"]
func StrArrayToJsonStr(a string) string { func StrArrayToJsonStr(a string) string {