⚝
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
/
Array
/
View File Name :
rotate-i.ri
U:RDoc::AnyMethod[iI"rotate:ETI"Array#rotate;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I";Returns a new \Array formed from +self+ with elements ;TI"'rotated from one end to the other.;To:RDoc::Markup::BlankLine o; ; [I"GWhen no argument given, returns a new \Array that is like +self+, ;TI"Iexcept that the first element has been rotated to the last position:;To:RDoc::Markup::Verbatim; [I"!a = [:foo, 'bar', 2, 'bar'] ;TI"a1 = a.rotate ;TI"%a1 # => ["bar", 2, "bar", :foo] ;T:@format0o; ; [I"1When given a non-negative \Integer +count+, ;TI"Vreturns a new \Array with +count+ elements rotated from the beginning to the end:;To;; [I"a = [:foo, 'bar', 2] ;TI"a1 = a.rotate(2) ;TI"a1 # => [2, :foo, "bar"] ;T; 0o; ; [I"HIf +count+ is large, uses <tt>count % array.size</tt> as the count:;To;; [I"a = [:foo, 'bar', 2] ;TI"a1 = a.rotate(20) ;TI"a1 # => [2, :foo, "bar"] ;T; 0o; ; [I">If +count+ is zero, returns a copy of +self+, unmodified:;To;; [I"a = [:foo, 'bar', 2] ;TI"a1 = a.rotate(0) ;TI"a1 # => [:foo, "bar", 2] ;T; 0o; ; [I"PWhen given a negative \Integer +count+, rotates in the opposite direction, ;TI"from end to beginning:;To;; [I"a = [:foo, 'bar', 2] ;TI"a1 = a.rotate(-2) ;TI"a1 # => ["bar", 2, :foo] ;T; 0o; ; [I"XIf +count+ is small (far from zero), uses <tt>count % array.size</tt> as the count:;To;; [I"a = [:foo, 'bar', 2] ;TI"a1 = a.rotate(-5) ;TI"a1 # => ["bar", 2, :foo];T; 0: @fileI"array.c;T:0@omit_headings_from_table_of_contents_below0I"@array.rotate -> new_array array.rotate(count) -> new_array ;T0[ I"(*args);T@CFI" Array;TcRDoc::NormalClass00