goutils icon indicating copy to clipboard operation
goutils copied to clipboard

isBlank 实现错误

Open aristotll opened this issue 2 years ago • 0 comments

github.com/printfcoder/goutils/stringutils

isBlank 实现错误

func IsBlank(cs string) bool {

if strLen := len(cs); strLen == 0 {
	return true
} else {
	return len(strings.TrimSpace(cs)) != strLen
}

}

应该是trim 后和 0 判断

aristotll avatar Jul 04 '23 13:07 aristotll