MCPcopy Index your code
hub / github.com/webpy/webpy / lstrips

Function lstrips

web/utils.py:326–340  ·  view source on GitHub ↗

removes the string `remove` from the left of `text` >>> lstrips("foobar", "foo") 'bar' >>> lstrips('http://foo.org/', ['http://', 'https://']) 'foo.org/' >>> lstrips('FOOBARBAZ', ['FOO', 'BAR']) 'BAZ' >>> lstrips('FOOBARBAZ', ['BAR', 'FOO

(text, remove)

Source from the content-addressed store, hash-verified

324
325
326def lstrips(text, remove):
327 """
328 removes the string `remove` from the left of `text`
329
330 >>> lstrips("foobar", "foo")
331 'bar'
332 >>> lstrips('http://foo.org/', ['http://', 'https://'])
333 'foo.org/'
334 >>> lstrips('FOOBARBAZ', ['FOO', 'BAR'])
335 'BAZ'
336 >>> lstrips('FOOBARBAZ', ['BAR', 'FOO'])
337 'BARBAZ'
338
339 """
340 return _strips("l", text, remove)
341
342
343def strips(text, remove):

Callers 2

loadMethod · 0.85
stripsFunction · 0.85

Calls 1

_stripsFunction · 0.85

Tested by

no test coverage detected