You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
275 B

package str
import (
"fmt"
"testing"
)
func TestHexEncode(t *testing.T) {
fmt.Println(StrTool.HexEncode("hello world!"))
//68656c6c6f20776f726c6421
}
func TestHexDecode(t *testing.T) {
fmt.Println(StrTool.HexDecode("68656c6c6f20776f726c6421"))
//hello world! <nil>
}