summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/string_strip.py
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-04-26 06:20:08 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-04-26 06:20:08 +0300
commit881078403e9edf63f3145f2a484a58d5a74f74f1 (patch)
tree18437be886d32ee9d9900fdfe305348fb228b258 /tests/basics/string_strip.py
parent12a9cfed7693a3e2495e619ec90c922c6ecb0908 (diff)
downloadmicropython-881078403e9edf63f3145f2a484a58d5a74f74f1.tar.gz
micropython-881078403e9edf63f3145f2a484a58d5a74f74f1.zip
objstr: Implement .lstrip() & .rstrip().
Share code with .strip(). TODO: optimize .rstrip().
Diffstat (limited to 'tests/basics/string_strip.py')
-rw-r--r--tests/basics/string_strip.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/basics/string_strip.py b/tests/basics/string_strip.py
index 518dfd66ec..8e03eff93a 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'))