代码Demo
import (
"fmt"
"strconv"
"testing"
)
func Test_1(t *testing.T) {
s:= "0e"
if parseUint, err := strconv.ParseUint(s, 16, 32);err != nil {
panic(err)
}else{
fmt.Println(parseUint)
}
}
打印
=== RUN Test_1
14
--- PASS: Test_1 (0.00s)
PASS
Process finished with exit code 0
|
请发表评论