mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
py: Fix str.replace for case when arg 0 or 1 is empty string.
This commit is contained in:
@@ -6,3 +6,8 @@ print("aabbaabbaabbaa".replace("aa", "cc", 3))
|
||||
print("a".replace("aa", "bb"))
|
||||
print("testingtesting".replace("ing", ""))
|
||||
print("testINGtesting".replace("ing", "ING!"))
|
||||
|
||||
print("".replace("", "1"))
|
||||
print("A".replace("", "1"))
|
||||
print("AB".replace("", "1"))
|
||||
print("AB".replace("", "12"))
|
||||
|
||||
Reference in New Issue
Block a user