Skip to content

Change behavior of String.right

Rafał Mikrut requested to merge github/fork/KoBeWi/I_broke_your_right into master

Created by: KoBeWi

Follow-up to #28648

Before:

print("Hello world".right(3)) #lo world

After:

print("Hello world".right(3)) #rld

Basically opposite of left(), so is more intuitive and consistent.

I replaced all source occurrences of right to substr(), which has the same behavior as old right. btw, right was calling substr anyways, so every instance that used it might be few µs faster now 🤔 (heh)

Merge request reports