mirror of
https://github.com/micropython/micropython.git
synced 2026-01-08 05:00:26 +01:00
objstr: *strip(): Fix handling of one-char subject strings.
This commit is contained in:
@@ -20,3 +20,14 @@ try:
|
||||
print('mississippi'.rstrip(b'ipz'))
|
||||
except TypeError:
|
||||
print("TypeError")
|
||||
|
||||
# single-char subj string used to give a problem
|
||||
print("a".strip())
|
||||
print("a".lstrip())
|
||||
print("a".rstrip())
|
||||
print(" a".strip())
|
||||
print(" a".lstrip())
|
||||
print(" a".rstrip())
|
||||
print("a ".strip())
|
||||
print("a ".lstrip())
|
||||
print("a ".rstrip())
|
||||
|
||||
Reference in New Issue
Block a user