Skip to content

isBlank 实现错误 #1

@aristotll

Description

@aristotll

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 判断

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions