⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
self
/
root
/
usr
/
share
/
ri
/
3.0.0
/
system
/
CSV
/
View File Name :
parse_line-c.ri
U:RDoc::AnyMethod[iI"parse_line:ETI"CSV::parse_line;TT:publico:RDoc::Markup::Document:@parts["o:RDoc::Markup::Paragraph; [I"LReturns the data created by parsing the first line of +string+ or +io+ ;TI"#using the specified +options+.;To:RDoc::Markup::BlankLine o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I"3Argument +string+ should be a \String object; ;TI"Kit will be put into a new StringIO object positioned at the beginning.;To;;0; [o; ; [I"2Argument +io+ should be an IO object that is:;To;; ;;[o;;0; [o; ; [I"?Open for reading; on return, the IO object will be closed.;To;;0; [o; ; [I""Positioned at the beginning. ;TI"ETo position at the end, for appending, use method CSV.generate. ;TI"GFor any other positioning, pass a preset \StringIO object instead.;To;;0; [o; ; [I"XArgument +options+: see {Options for Parsing}[#class-CSV-label-Options+for+Parsing];T@S:RDoc::Markup::Heading: leveli: textI"Without Option +headers+;T@o; ; [I"EWithout option +headers+, returns the first row as a new \Array.;T@o; ; [I".These examples assume prior execution of:;To:RDoc::Markup::Verbatim; [I"&string = "foo,0\nbar,1\nbaz,2\n" ;TI"path = 't.csv' ;TI"File.write(path, string) ;T:@format0o; ; [I"0Parse the first line from a \String object:;To;; [I".CSV.parse_line(string) # => ["foo", "0"] ;T;0o; ; [I"-Parse the first line from a File object:;To;; [I"File.open(path) do |file| ;TI". CSV.parse_line(file) # => ["foo", "0"] ;TI"end # => ["foo", "0"] ;T;0o; ; [I"7Returns +nil+ if the argument is an empty \String:;To;; [I"!CSV.parse_line('') # => nil ;T;0S;;i;I"With Option +headers+;T@o; ; [I"?With {option +headers+}[#class-CSV-label-Option+headers], ;TI"0returns the first row as a CSV::Row object.;T@o; ; [I".These examples assume prior execution of:;To;; [I"2string = "Name,Count\nfoo,0\nbar,1\nbaz,2\n" ;TI"path = 't.csv' ;TI"File.write(path, string) ;T;0o; ; [I"0Parse the first line from a \String object:;To;; [I"UCSV.parse_line(string, headers: true) # => #
;T;0o; ; [I"-Parse the first line from a File object:;To;; [I"File.open(path) do |file| ;TI"+ CSV.parse_line(file, headers: true) ;TI"3end # => #
;T;0S:RDoc::Markup::Rule:weighti@o; ; [I"2Raises an exception if the argument is +nil+:;To;; [I"7# Raises ArgumentError (Cannot parse nil as CSV): ;TI"CSV.parse_line(nil);T;0: @fileI"lib/csv.rb;T:0@omit_headings_from_table_of_contents_below0I"<CSV.parse_line(string) -> new_array or nil CSV.parse_line(io) -> new_array or nil CSV.parse_line(string, **options) -> new_array or nil CSV.parse_line(io, **options) -> new_array or nil CSV.parse_line(string, headers: true, **options) -> csv_row or nil CSV.parse_line(io, headers: true, **options) -> csv_row or nil ;T0[ I"(line, **options);T@uFI"CSV;TcRDoc::NormalClass00