isValidDollarTagContent returns true if s contains only valid characters for a dollar tag.
(s string)
| 223 | |
| 224 | // isValidDollarTagContent returns true if s contains only valid characters for a dollar tag. |
| 225 | func isValidDollarTagContent(s string) bool { |
| 226 | if s == "" { |
| 227 | return true // $$ is valid |
| 228 | } |
| 229 | for _, ch := range s { |
| 230 | if !isValidDollarTagChar(byte(ch)) { |
| 231 | return false |
| 232 | } |
| 233 | } |
| 234 | return true |
| 235 | } |
| 236 | |
| 237 | // isValidDollarTagChar returns true if ch is a valid character in a dollar tag. |
| 238 | // Valid characters are alphanumeric and underscore. |
no test coverage detected