golang中判斷字符串是否為空的方法:
if len(str) == 0{ }
推薦學(xué)習(xí):go基礎(chǔ)教程
或者使用下面的方法判斷:
if str == "" { }
測試方法:
func Benchmark_Fun(b *testing.B) { ....... }
golang中判斷字符串是否為空的方法:
if len(str) == 0{ }
推薦學(xué)習(xí):go基礎(chǔ)教程
或者使用下面的方法判斷:
if str == "" { }
測試方法:
func Benchmark_Fun(b *testing.B) { ....... }