go 截取字符串指定字符
1. Substr(str string, start int, length int) string
a := "abcde"
b := Substr(a, 1, 2)
fmt.Println(b)
// bc
2.[:]
a := "abcde"
b := a[1:3]
fmt.Println(b)
// bc
a := "abcde"
b := Substr(a, 1, 2)
fmt.Println(b)
// bc
a := "abcde"
b := a[1:3]
fmt.Println(b)
// bc