File: //usr/share/ri/3.0.0/system/String/rindex-i.ri
U:RDoc::AnyMethod[iI"rindex:ETI"String#rindex;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"SReturns the \Integer index of the _last_ occurrence of the given +substring+, ;TI"or +nil+ if none found:;To:RDoc::Markup::Verbatim; [ I"'foo'.rindex('f') # => 0
;TI"'foo'.rindex('o') # => 2
;TI"'foo'.rindex('oo') # => 1
;TI""'foo'.rindex('ooo') # => nil
;T:@format0o;
; [I"TReturns the \Integer index of the _last_ match for the given \Regexp +regexp+, ;TI"or +nil+ if none found:;To;; [ I"'foo'.rindex(/f/) # => 0
;TI"'foo'.rindex(/o/) # => 2
;TI"'foo'.rindex(/oo/) # => 1
;TI""'foo'.rindex(/ooo/) # => nil
;T;0o;
; [I"j\Integer argument +offset+, if given and non-negative, specifies the maximum starting position in the;To;; [
I"!string to _end_ the search:
;TI"$ 'foo'.rindex('o', 0) # => nil
;TI"" 'foo'.rindex('o', 1) # => 1
;TI"" 'foo'.rindex('o', 2) # => 2
;TI"" 'foo'.rindex('o', 3) # => 2
;T;0o;
; [I"NIf +offset+ is a negative \Integer, the maximum starting position in the ;TI"Ostring to _end_ the search is the sum of the string's length and +offset+:;To;; [ I""'foo'.rindex('o', -1) # => 2
;TI""'foo'.rindex('o', -2) # => 1
;TI"$'foo'.rindex('o', -3) # => nil
;TI"$'foo'.rindex('o', -4) # => nil
;T;0o;
; [I"Related: String#index;T:
@fileI"
string.c;T:0@omit_headings_from_table_of_contents_below0I"string.rindex(substring, offset = self.length) -> integer or nil
string.rindex(regexp, offset = self.length) -> integer or nil
;T0[ I"(p1, p2 = v2);T@6FI"String;TcRDoc::NormalClass00