Re: String search backwards?

n = orig_str.rindex(sub_str)

Does it help?
Gennady.

Gennady B. wrote:

n = orig_str.rindex(sub_str)

Thanks. Obviously I have a reading deficiency.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs