From 881078403e9edf63f3145f2a484a58d5a74f74f1 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 26 Apr 2014 06:20:08 +0300 Subject: objstr: Implement .lstrip() & .rstrip(). Share code with .strip(). TODO: optimize .rstrip(). --- tests/basics/string_strip.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/basics/string_strip.py b/tests/basics/string_strip.py index 518dfd66e..8e03eff93 100644 --- a/tests/basics/string_strip.py +++ b/tests/basics/string_strip.py @@ -4,3 +4,9 @@ print(" T E S T".strip()) print("abcabc".strip("ce")) print("aaa".strip("b")) print("abc efg ".strip("g a")) + +print(' spacious '.lstrip()) +print('www.example.com'.lstrip('cmowz.')) + +print(' spacious '.rstrip()) +print('mississippi'.rstrip('ipz')) -- cgit v1.2.3