Created
September 15, 2015 13:50
-
-
Save hartfordfive/1d44e04ac8f7f49a319d to your computer and use it in GitHub Desktop.
Sample Go utility functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func is_whitespace(ch rune) bool { return ch == ' ' || ch == '\t' || ch == '\n' } | |
| func is_alpha(ch rune) bool { return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') } | |
| func is_numeric(ch rune) bool { return (ch >= '0' && ch <= '9') } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment