feat: 增加验证字符串去空格之后不为空方法
This commit is contained in:
@@ -152,3 +152,8 @@ func Random(length int, sourceCharList string) string {
|
||||
}
|
||||
return string(genStrByte)
|
||||
}
|
||||
|
||||
// ValidateNotEmpty 验证字符串去前后空格之后不为空
|
||||
func ValidateNotEmpty(str string) bool {
|
||||
return strings.TrimSpace(str) != ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user