Wrote function to generate rune slice representing valid dot metacharacter values

master
Aadhavan Srinivasan 2 months ago
parent 96b3009c14
commit 76157af2b8

@ -5,6 +5,16 @@ import (
"unicode"
)
func dotCharacters() []rune { // Returns all possible characters represented by the dot metacharacter
start := 0x0020
end := 0x007E
to_return := make([]rune, (end-start)+1)
for i := start; i <= end; i++ {
to_return = append(to_return, rune(i))
}
return to_return
}
func isAlphaNum(c rune) bool {
return unicode.IsLetter(c) || unicode.IsNumber(c)
}

Loading…
Cancel
Save