⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.93
Server IP:
65.108.141.171
Server:
Linux server.heloix.com 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
7.4.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
2.7.0
/
system
/
String
/
Edit File: split-i.ri
U:RDoc::AnyMethod[iI" split:ETI"String#split;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"QDivides <i>str</i> into substrings based on a delimiter, returning an array ;TI"of these substrings.;To:RDoc::Markup::BlankLine o; ; [ I"BIf <i>pattern</i> is a String, then its contents are used as ;TI"Lthe delimiter when splitting <i>str</i>. If <i>pattern</i> is a single ;TI"Ispace, <i>str</i> is split on whitespace, with leading and trailing ;TI"Ewhitespace and runs of contiguous whitespace characters ignored.;T@o; ; [ I"DIf <i>pattern</i> is a Regexp, <i>str</i> is divided where the ;TI"Ipattern matches. Whenever the pattern matches a zero-length string, ;TI"P<i>str</i> is split into individual characters. If <i>pattern</i> contains ;TI"Jgroups, the respective matches will be returned in the array as well.;T@o; ; [I"RIf <i>pattern</i> is <code>nil</code>, the value of <code>$;</code> is used. ;TI"RIf <code>$;</code> is <code>nil</code> (which is the default), <i>str</i> is ;TI"2split on whitespace as if ' ' were specified.;T@o; ; [ I"HIf the <i>limit</i> parameter is omitted, trailing null fields are ;TI"Ksuppressed. If <i>limit</i> is a positive number, at most that number ;TI"Lof split substrings will be returned (captured groups will be returned ;TI"6as well, but are not counted towards the limit). ;TI"3If <i>limit</i> is <code>1</code>, the entire ;TI"Pstring is returned as the only entry in an array. If negative, there is no ;TI"Nlimit to the number of fields returned, and trailing null fields are not ;TI"suppressed.;T@o; ; [I"OWhen the input +str+ is empty an empty Array is returned as the string is ;TI"+considered to have no fields to split.;T@o:RDoc::Markup::Verbatim; [I"B" now's the time ".split #=> ["now's", "the", "time"] ;TI"B" now's the time ".split(' ') #=> ["now's", "the", "time"] ;TI"J" now's the time".split(/ /) #=> ["", "now's", "", "the", "time"] ;TI"B"1, 2.34,56, 7".split(%r{,\s*}) #=> ["1", "2.34", "56", "7"] ;TI"C"hello".split(//) #=> ["h", "e", "l", "l", "o"] ;TI";"hello".split(//, 3) #=> ["h", "e", "llo"] ;TI"C"hi mom".split(%r{\s*}) #=> ["h", "i", "m", "o", "m"] ;TI" ;TI";"mellow yellow".split("ello") #=> ["m", "w y", "w"] ;TI"B"1,2,,3,4,,".split(',') #=> ["1", "2", "", "3", "4"] ;TI"A"1,2,,3,4,,".split(',', 4) #=> ["1", "2", "", "3,4,,"] ;TI"J"1,2,,3,4,,".split(',', -4) #=> ["1", "2", "", "3", "4", "", ""] ;TI" ;TI"C"1:2:3".split(/(:)()()/, 2) #=> ["1", ":", "", "", "2:3"] ;TI" ;TI","".split(',', -1) #=> [] ;T:@format0o; ; [I"EIf a block is given, invoke the block with each split substring.;T: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"vstr.split(pattern=nil, [limit]) -> an_array str.split(pattern=nil, [limit]) {|sub| block } -> str ;T0[ I"(p1 = v1, p2 = v2);T@DFI"String;TcRDoc::NormalClass00
Simpan