(s, amount)
| 166 | |
| 167 | # Strip a given amount of excess padding from the given string |
| 168 | def _strip_padding(s, amount): |
| 169 | lpos = 0 |
| 170 | while amount and s[lpos] == ' ': |
| 171 | lpos += 1 |
| 172 | amount -= 1 |
| 173 | rpos = len(s) - 1 |
| 174 | while amount and s[rpos] == ' ': |
| 175 | rpos -= 1 |
| 176 | amount -= 1 |
| 177 | return s[lpos:rpos+1] |
| 178 | |
| 179 | _percent_re = None |
| 180 |
no outgoing calls
no test coverage detected
searching dependent graphs…