Split a camelcased `identifier` into words.
(identifier)
| 73 | |
| 74 | # Thanks to https://stackoverflow.com/questions/29916065/how-to-do-camelcase-split-in-python |
| 75 | def camel_case_split(identifier): |
| 76 | """Split a camelcased `identifier` into words.""" |
| 77 | matches = re.finditer(".+?(?:(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])|$)", identifier) |
| 78 | return [m.group(0) for m in matches] |
| 79 | |
| 80 | |
| 81 | def _center_text(text, width): |
no outgoing calls
no test coverage detected