github.com/gnolang/gno@v0.0.0-20240520182011-228e9d0192ce/tm2/pkg/amino/strings.go (about) 1 package amino 2 3 // NOTE: from tendermint/libs/strings. 4 5 // Returns true if s is a non-empty printable non-tab ascii character. 6 func IsASCIIText(s string) bool { 7 if len(s) == 0 { 8 return false 9 } 10 for _, b := range []byte(s) { 11 if 32 <= b && b <= 126 { 12 // good 13 } else { 14 return false 15 } 16 } 17 return true 18 }