Issue #9116 has been updated by shevegen (markus heiler).


Oh, now I see:

"Except for splitting from the right, rsplit() behaves like split() which is described in detail below."

So it basically splits from the right, not left, unlike #split() which splits from the left, I think.

I suppose in Ruby you can do .reverse.split, but perhaps rsplit may be more convenient. (I myself don't think I have had a need to use something similar to rsplit so far).
----------------------------------------
Feature #9116: String#rsplit missing
https://bugs.ruby-lang.org/issues/9116#change-43011

Author: artagnon (Ramkumar Ramachandra)
Status: Open
Priority: Normal
Assignee: 
Category: lib
Target version: 


There's nothing corresponding to Python's rsplit(). A quick glance at rb_str_split_m() tells me that it should be pretty trivial to implement. Is there any specific reason it hasn't already been done?


-- 
http://bugs.ruby-lang.org/