MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _strip_padding

Function _strip_padding

tools/python-3.11.9-amd64/Lib/locale.py:169–178  ·  view source on GitHub ↗
(s, amount)

Source from the content-addressed store, hash-verified

167
168# Strip a given amount of excess padding from the given string
169def _strip_padding(s, amount):
170 lpos = 0
171 while amount and s[lpos] == ' ':
172 lpos += 1
173 amount -= 1
174 rpos = len(s) - 1
175 while amount and s[rpos] == ' ':
176 rpos -= 1
177 amount -= 1
178 return s[lpos:rpos+1]
179
180_percent_re = re.compile(r'%(?:\((?P<key>.*?)\))?'
181 r'(?P<modifiers>[-#0-9 +*.hlL]*?)[eEfFgGdiouxXcrs%]')

Callers 1

_localizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected