Miscellaneous helper functions Test if a character is a punctuation symbol. Taken from a private function in regexp in the stdlib.
(c byte)
| 803 | // Test if a character is a punctuation symbol. |
| 804 | // Taken from a private function in regexp in the stdlib. |
| 805 | func ispunct(c byte) bool { |
| 806 | for _, r := range []byte("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~") { |
| 807 | if c == r { |
| 808 | return true |
| 809 | } |
| 810 | } |
| 811 | return false |
| 812 | } |
| 813 | |
| 814 | // Test if a character is a whitespace character. |
| 815 | func isspace(c byte) bool { |
no outgoing calls
no test coverage detected
searching dependent graphs…