firstForbiddenCharInModelToken returns the first character in s that is not in [A-Za-z0-9_.-], or 0 if all characters are allowed. Used for model tokens (V-MAF-006).
(s string)
| 120 | // [A-Za-z0-9_.-], or 0 if all characters are allowed. |
| 121 | // Used for model tokens (V-MAF-006). |
| 122 | func firstForbiddenCharInModelToken(s string) rune { |
| 123 | for _, r := range s { |
| 124 | if !isAlpha(r) && !isDigit(r) && r != '_' && r != '.' && r != '-' { |
| 125 | return r |
| 126 | } |
| 127 | } |
| 128 | return 0 |
| 129 | } |
| 130 | |
| 131 | // firstForbiddenCharInBareName returns the first character in s that is not in |
| 132 | // [A-Za-z0-9._-], or 0 if all characters are allowed. |
no test coverage detected