Hacker News new | past | comments | ask | show | jobs | submit login

I would have preferred 'stripprefix' for unity with 'strip', 'rstrip', and 'lstrip'



That'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.


They work differently. Strip removes all given characters from the end in any order. Trim sounds better to me, like one operation.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: