forked from golang/hotime
This commit is contained in:
parent
cf8ba558ca
commit
e99c726e26
16
objtoobj.go
16
objtoobj.go
@ -238,6 +238,22 @@ func ObjToStr(obj interface{}) string {
|
||||
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"]
|
||||
func StrArrayToJsonStr(a string) string {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user