feat: 增加验证字符串去空格之后不为空方法

This commit is contained in:
zhangdeman committed 2026-11-02 09:16:16 +08:00
1 parent 09c64ba254
commit c21f29c721
1 file changed
+5
+5
View File
@@ -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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.