3 ms·
I would have preferred 'stripprefix' for unity with 'strip', 'rstrip', and 'lstrip'
by kbd 6y ago
I would have preferred 'stripprefix' for unity with 'strip', 'rstrip', and 'lstrip'
- mixmastamyk 6y agoThey work differently. Strip removes all given characters from the end in any order. Trim sounds better to me, like one operation.
- pdonis 6y agoThat's discussed in the article: the "strip" methods don't interpret strings of multiple characters as a single prefix or suffix to be removed, so it was felt to be too confusing to use "strip" type names for methods that do interpret strings that way.