Gestionnaire de fichiers - Editer - /opt/cpanel/ea-ruby24/root/usr/share/ri/system/String/split-i.ri
Arrière
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"OIf <i>pattern</i> is a <code>String</code>, then its contents are used as ;TI"Lthe delimiter when splitting <i>str</i>. If <i>pattern</i> is a single ;TI"Pspace, <i>str</i> is split on whitespace, with leading whitespace and runs ;TI"1of contiguous whitespace characters ignored.;T@o; ; [ I"QIf <i>pattern</i> is a <code>Regexp</code>, <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:@format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"3str.split(pattern=nil, [limit]) -> an_array ;T0[ I"(p1 = v1, p2 = v2);T@AFI"String;TcRDoc::NormalClassI" scanf;T0
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Génération de la page: 0 |
proxy
|
phpinfo
|
Réglages