Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby27
/
share
/
ri
/
system
/
String
/
//opt/alt/ruby27/share/ri/system/String/each_line-i.ri
U:RDoc::AnyMethod[iI"each_line:ETI"String#each_line;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [ I"BSplits <i>str</i> using the supplied parameter as the record ;TI"Gseparator (<code>$/</code> by default), passing each substring in ;TI"Gturn to the supplied block. If a zero-length record separator is ;TI"@supplied, the string is split into paragraphs delimited by ;TI""multiple successive newlines.;To:RDoc::Markup::BlankLine o; ; [I"LIf +chomp+ is +true+, +separator+ will be removed from the end of each ;TI" line.;T@o; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [!I"("hello\nworld".each_line {|s| p s} ;TI"# prints: ;TI"# "hello\n" ;TI"# "world" ;TI" ;TI"-"hello\nworld".each_line('l') {|s| p s} ;TI"# prints: ;TI"# "hel" ;TI" # "l" ;TI"# "o\nworl" ;TI" # "d" ;TI" ;TI"0"hello\n\n\nworld".each_line('') {|s| p s} ;TI"# prints ;TI"# "hello\n\n" ;TI"# "world" ;TI" ;TI"5"hello\nworld".each_line(chomp: true) {|s| p s} ;TI"# prints: ;TI"# "hello" ;TI"# "world" ;TI" ;TI":"hello\nworld".each_line('l', chomp: true) {|s| p s} ;TI"# prints: ;TI"# "he" ;TI"# "" ;TI"# "o\nwor" ;TI"# "d";T:@format0: @fileI" string.c;T:0@omit_headings_from_table_of_contents_below0I"�str.each_line(separator=$/, chomp: false) {|substr| block } -> str str.each_line(separator=$/, chomp: false) -> an_enumerator ;T0[ I"(*args);T@8FI"String;TcRDoc::NormalClass00