(str string)
| 6 | ) |
| 7 | |
| 8 | func IsValidIdentifier(str string) bool { |
| 9 | if len(str) == 0 { |
| 10 | return false |
| 11 | } |
| 12 | h, w := utf8.DecodeRuneInString(str) |
| 13 | if !IsAlphabetic(h) { |
| 14 | return false |
| 15 | } |
| 16 | for _, r := range str[w:] { |
| 17 | if !IsAlphaNumeric(r) { |
| 18 | return false |
| 19 | } |
| 20 | } |
| 21 | return true |
| 22 | } |
| 23 | |
| 24 | func IsSpace(r rune) bool { |
| 25 | return unicode.IsSpace(r) |
no test coverage detected
searching dependent graphs…