isNumber reports whether the string is a number (category N).
(s string)
| 700 | |
| 701 | // isNumber reports whether the string is a number (category N). |
| 702 | func isNumber(s string) bool { |
| 703 | for _, r := range s { |
| 704 | if !unicode.IsNumber(r) { |
| 705 | return false |
| 706 | } |
| 707 | } |
| 708 | return true |
| 709 | } |
| 710 | |
| 711 | // allString reports if the slice contains only strings. |
| 712 | func allString(v []any) bool { |