MCPcopy Index your code
hub / github.com/python/cpython / _strip_padding

Function _strip_padding

Lib/locale.py:168–177  ·  view source on GitHub ↗
(s, amount)

Source from the content-addressed store, hash-verified

166
167# Strip a given amount of excess padding from the given string
168def _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

Callers 1

_localizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…