From c21f29c721c5a2bbc6969816d1aa35cf4116f0b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E8=8C=B6=E6=B8=85=E6=AC=A2?= Date: Mon, 2 Nov 2026 09:16:16 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2=E5=8E=BB=E7=A9=BA=E6=A0=BC=E4=B9=8B?= =?UTF-8?q?=E5=90=8E=E4=B8=8D=E4=B8=BA=E7=A9=BA=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- op_string/tool.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/op_string/tool.go b/op_string/tool.go index 886f099..17d7c14 100644 --- a/op_string/tool.go +++ b/op_string/tool.go @@ -152,3 +152,8 @@ func Random(length int, sourceCharList string) string { } return string(genStrByte) } + +// ValidateNotEmpty 验证字符串去前后空格之后不为空 +func ValidateNotEmpty(str string) bool { + return strings.TrimSpace(str) != "" +}