1234567891011121314151617181920212223242526272829303132 |
- package strutils
- import (
- uuid "github.com/satori/go.uuid"
- "strings"
- )
- func AllBlank(str ...string) bool {
- for _, s := range str {
- if !IsStringEmpty(s) {
- return false
- }
- }
- return true
- }
- func IsStringEmpty(s string) bool {
- return strings.Trim(s, " ") == ""
- }
- func IsStringNotEmpty(s string) bool {
- return strings.Trim(s, " ") != ""
- }
- func GetUUID() string {
- return uuid.NewV4().String()
- }
- func SimpleUUID() string {
- return strings.ReplaceAll(GetUUID(), "-", "")
- }
|