feat: add IsNotBlank func (#132)

Co-authored-by: yuanyou <yuanyou@kezaihui.com>
This commit is contained in:
elzaandyuanyou authored and GitHub committed 2023-09-13 15:29:26 +08:00
1 parent b698fec50f
commit f445ecbaf8
6 files changed
+119

No files matched your search

+5
View File
@@ -408,6 +408,11 @@ func IsBlank(str string) bool {
return true
}
// IsNotBlank checks if a string is not whitespace, not empty.
func IsNotBlank(str string) bool {
return !IsBlank(str)
}
// HasPrefixAny check if a string starts with any of a slice of specified strings.
// Play: https://go.dev/play/p/8UUTl2C5slo
func HasPrefixAny(str string, prefixes []string) bool {