kefu/tools/url.go

15 lines
218 B
Go
Raw Permalink Normal View History

2024-12-10 02:50:12 +00:00
package tools
import "net/url"
func UrlEncode(str string) string {
return url.QueryEscape(str)
}
func UrlDecode(str string) string {
res, err := url.QueryUnescape(str)
if err != nil {
return ""
}
return res
}