Checks whether the last character in text is one of a punctuation, control or whitespace character.
(text)
| 84 | |
| 85 | |
| 86 | def _is_end_of_word(text): |
| 87 | """Checks whether the last character in text is one of a punctuation, control or whitespace character.""" |
| 88 | last_char = text[-1] |
| 89 | return bool(_is_control(last_char) | _is_punctuation(last_char) | _is_whitespace(last_char)) |
| 90 | |
| 91 | |
| 92 | def _is_start_of_word(text): |
no test coverage detected