removes the string `remove` from the both sides of `text` >>> strips("foobarfoo", "foo") 'bar'
(text, remove)
| 341 | |
| 342 | |
| 343 | def strips(text, remove): |
| 344 | """ |
| 345 | removes the string `remove` from the both sides of `text` |
| 346 | |
| 347 | >>> strips("foobarfoo", "foo") |
| 348 | 'bar' |
| 349 | |
| 350 | """ |
| 351 | return rstrips(lstrips(text, remove), remove) |
| 352 | |
| 353 | |
| 354 | def safestr(obj, encoding="utf-8"): |