⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.25
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
/
Array
/
View File Name :
slice%21-i.ri
U:RDoc::AnyMethod[iI"slice!:ETI"Array#slice!;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I".Removes and returns elements from +self+.;To:RDoc::Markup::BlankLine o; ; [I"0When the only argument is an \Integer +n+, ;TI"5removes and returns the _nth_ element in +self+:;To:RDoc::Markup::Verbatim; [I"a = [:foo, 'bar', 2] ;TI"a.slice!(1) # => "bar" ;TI"a # => [:foo, 2] ;T:@format0o; ; [I"AIf +n+ is negative, counts backwards from the end of +self+:;To;; [I"a = [:foo, 'bar', 2] ;TI"a.slice!(-1) # => 2 ;TI"a # => [:foo, "bar"] ;T; 0o; ; [I"+If +n+ is out of range, returns +nil+.;T@o; ; [I"@When the only arguments are Integers +start+ and +length+, ;TI"Iremoves +length+ elements from +self+ beginning at offset +start+; ;TI"0returns the deleted objects in a new Array:;To;; [I"a = [:foo, 'bar', 2] ;TI"'a.slice!(0, 2) # => [:foo, "bar"] ;TI"a # => [2] ;T; 0o; ; [I"8If <tt>start + length</tt> exceeds the array size, ;TI"Eremoves and returns all elements from offset +start+ to the end:;To;; [I"a = [:foo, 'bar', 2] ;TI"%a.slice!(1, 50) # => ["bar", 2] ;TI"a # => [:foo] ;T; 0o; ; [I"?If <tt>start == a.size</tt> and +length+ is non-negative, ;TI" returns a new empty \Array.;T@o; ; [I",If +length+ is negative, returns +nil+.;T@o; ; [I"8When the only argument is a \Range object +range+, ;TI"Ztreats <tt>range.min</tt> as +start+ above and <tt>range.size</tt> as +length+ above:;To;; [I"a = [:foo, 'bar', 2] ;TI"% a.slice!(1..2) # => ["bar", 2] ;TI"a # => [:foo] ;T; 0o; ; [I"CIf <tt>range.start == a.size</tt>, returns a new empty \Array.;T@o; ; [I"JIf <tt>range.start</tt> is larger than the array size, returns +nil+.;T@o; ; [I"SIf <tt>range.end</tt> is negative, counts backwards from the end of the array:;To;; [I"a = [:foo, 'bar', 2] ;TI"(a.slice!(0..-2) # => [:foo, "bar"] ;TI"a # => [2] ;T; 0o; ; [I"*If <tt>range.start</tt> is negative, ;TI"Dcalculates the start index backwards from the end of the array:;To;; [I"a = [:foo, 'bar', 2] ;TI"%a.slice!(-2..2) # => ["bar", 2] ;TI"a # => [:foo];T; 0: @fileI"array.c;T:0@omit_headings_from_table_of_contents_below0I"~array.slice!(n) -> object or nil array.slice!(start, length) -> new_array or nil array.slice!(range) -> new_array or nil ;T0[ I"(*args);T@]FI" Array;TcRDoc::NormalClass00