⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.13
Server IP:
109.199.105.153
Server:
Linux connect.inboxifs.com 5.15.0-152-generic #162-Ubuntu SMP Wed Jul 23 09:48:42 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
3.0.0
/
system
/
String
/
View File Name :
slice-i.ri
U:RDoc::AnyMethod[iI" slice:ETI"String#slice;TF:publico:RDoc::Markup::Document:@parts[$o:RDoc::Markup::Paragraph; [I"@Returns the substring of +self+ specified by the arguments.;To:RDoc::Markup::BlankLine o; ; [I"9When the single \Integer argument +index+ is given, ;TI"Ireturns the 1-character substring found in +self+ at offset +index+:;To:RDoc::Markup::Verbatim; [I"'bar'[2] # => "r" ;T:@format0o; ; [I"CCounts backward from the end of +self+ if +index+ is negative:;To;; [I"'foo'[-3] # => "f" ;T; 0o; ; [I".Returns +nil+ if +index+ is out of range:;To;; [I"'foo'[3] # => nil ;TI"'foo'[-4] # => nil ;T; 0o; ; [I"FWhen the two \Integer arguments +start+ and +length+ are given, ;TI"Sreturns the substring of the given +length+ found in +self+ at offset +start+:;To;; [I"'foo'[0, 2] # => "fo" ;TI"'foo'[0, 0] # => "" ;T; 0o; ; [I"CCounts backward from the end of +self+ if +start+ is negative:;To;; [I"'foo'[-2, 2] # => "oo" ;T; 0o; ; [I"[Special case: returns a new empty \String if +start+ is equal to the length of +self+:;To;; [I"'foo'[3, 2] # => "" ;T; 0o; ; [I".Returns +nil+ if +start+ is out of range:;To;; [I"'foo'[4, 2] # => nil ;TI"'foo'[-4, 2] # => nil ;T; 0o; ; [I"CReturns the trailing substring of +self+ if +length+ is large:;To;; [I"'foo'[1, 50] # => "oo" ;T; 0o; ; [I"+Returns +nil+ if +length+ is negative:;To;; [I"'foo'[0, -1] # => nil ;T; 0o; ; [I"7When the single \Range argument +range+ is given, ;TI"Aderives +start+ and +length+ values from the given +range+, ;TI"!and returns values as above:;To:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I"@<tt>'foo'[0..1]</tt> is equivalent to <tt>'foo'[0, 2]</tt>.;To;;0; [o; ; [I"A<tt>'foo'[0...1]</tt> is equivalent to <tt>'foo'[0, 1]</tt>.;T@o; ; [ I"2When the \Regexp argument +regexp+ is given, ;TI"/and the +capture+ argument is <tt>0</tt>, ;TI";returns the first matching substring found in +self+, ;TI"or +nil+ if none found:;To;; [ I"'foo'[/o/] # => "o" ;TI"'foo'[/x/] # => nil ;TI"s = 'hello there' ;TI""s[/[aeiou](.)\1/] # => "ell" ;TI"%s[/[aeiou](.)\1/, 0] # => "ell" ;T; 0o; ; [ I"8If argument +capture+ is given and not <tt>0</tt>, ;TI"eit should be either an \Integer capture group index or a \String or \Symbol capture group name; ;TI"8the method call returns only the specified capture ;TI"H(see {Regexp Capturing}[Regexp.html#class-Regexp-label-Capturing]):;To;; [ I"s = 'hello there' ;TI"#s[/[aeiou](.)\1/, 1] # => "l" ;TI"Hs[/(?<vowel>[aeiou])(?<non_vowel>[^aeiou])/, "non_vowel"] # => "l" ;TI"Cs[/(?<vowel>[aeiou])(?<non_vowel>[^aeiou])/, :vowel] # => "e" ;T; 0o; ; [I"SIf an invalid capture group index is given, +nil+ is returned. If an invalid ;TI"9capture group name is given, +IndexError+ is raised.;T@o; ; [I"<When the single \String argument +substring+ is given, ;TI"Areturns the substring from +self+ if found, otherwise +nil+:;To;; [I"'foo'['oo'] # => "oo" ;TI"'foo'['xx'] # => nil ;T; 0o; ; [I",String#slice is an alias for String#[].;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below000[ I"(*args);T@~FI"String;TcRDoc::NormalClass0[@�FI"[];T