[New-bugs-announce] [issue4541] Add str method for removing leading or trailing substrings
report at bugs.python.org
Fri Dec 5 01:33:34 CET 2008
New submission from Zach Hirsch <zhirsch at umich.edu>:
I've found that having a way to strip a leading substring from a string
is convienent. I've also gotten bitten by the fact that str.strip takes
a sequence of characters to remove from the beginning -- not a full string.
I've attached a patch that implements lstrips, rstrips, and strips on
str, unicode, and as methods in the string module. I'm not particularly
attached to the names.
Please consider this patch for inclusion in Python. Thanks!
components: Library (Lib)
title: Add str method for removing leading or trailing substrings
type: feature request
versions: Python 2.7
Added file: http://bugs.python.org/file12232/lstrips-67529.patch
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce