golang中判断字符串是否为空的方法:
if len(str) == 0{
}
或使用下面的方法判断:
if str == "" {
}
测试方法:
func Benchmark_Fun(b *testing.B) {
.......
}
golang中判断字符串是否为空的方法:
if len(str) == 0{
}
或使用下面的方法判断:
if str == "" {
}
测试方法:
func Benchmark_Fun(b *testing.B) {
.......
}