Is there a Ruby equivalent of Python's method for getting a substring that ends at the end of the string, like str[3:]
? It's not convenient to have to put in the length of the string.
Pass a range with last element = -1
str[3..-1]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With