Return the number of initial spaces in a string
(strng)
| 337 | ini_spaces_re = re.compile(r'^(\s+)') |
| 338 | |
| 339 | def num_ini_spaces(strng): |
| 340 | """Return the number of initial spaces in a string""" |
| 341 | |
| 342 | ini_spaces = ini_spaces_re.match(strng) |
| 343 | if ini_spaces: |
| 344 | return ini_spaces.end() |
| 345 | else: |
| 346 | return 0 |
| 347 | |
| 348 | |
| 349 | def format_screen(strng): |
nothing calls this directly
no outgoing calls
no test coverage detected