string_test.go 392 B

1234567891011121314151617181920
  1. package common
  2. import (
  3. "fmt"
  4. "testing"
  5. )
  6. func TestUrlDecode(t *testing.T) {
  7. fmt.Println(UrlDecode("hello%E4%BD%A0%E5%A5%BD"))
  8. fmt.Println(UrlDecode("hello你好"))
  9. }
  10. func TestString2Md5(t *testing.T) {
  11. fmt.Println(String2Md5("11111112321"))
  12. fmt.Println(String2Md5("11111112321"))
  13. }
  14. func TestUrlEncode(t *testing.T) {
  15. fmt.Println(UrlEncode(UrlDecode("hello%E4%BD%A0%E5%A5%BD")))
  16. }