AlkantarClanX12
Current Path : /opt/alt/ruby18/share/ri/1.8/system/CSV/ |
Current File : //opt/alt/ruby18/share/ri/1.8/system/CSV/parse_row-c.yaml |
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Parse a line from string. Consider using CSV.parse_line instead. To parse lines in CSV string, see EXAMPLE below. - !ruby/struct:SM::Flow::P body: EXAMPLE - !ruby/struct:SM::Flow::VERB body: " src = "a,b\\r\\nc,d\\r\\ne,f"\n idx = 0\n begin\n parsed = []\n parsed_cells, idx = CSV.parse_row(src, idx, parsed)\n puts "Parsed #{ parsed_cells } cells."\n p parsed\n end while parsed_cells > 0\n" - !ruby/struct:SM::Flow::P body: ARGS - !ruby/struct:SM::Flow::VERB body: " src: a CSV data to be parsed. Must respond '[](idx)'.\n src[](idx) must return a char. (Not a string such as 'a', but 97).\n src[](idx_out_of_bounds) must return nil. A String satisfies this\n requirement.\n idx: index of parsing location of 'src'. 0 origin.\n out_dev: buffer for parsed cells. Must respond '<<(aString)'.\n col_sep: Column separator. ?, by default. If you want to separate\n fields with semicolon, give ?; here.\n row_sep: Row separator. nil by default. nil means "\\r\\n or \\n". If you\n want to separate records with \\r, give ?\\r here.\n" - !ruby/struct:SM::Flow::P body: RETURNS - !ruby/struct:SM::Flow::VERB body: " parsed_cells: num of parsed cells.\n idx: index of next parsing location of 'src'.\n" full_name: CSV::parse_row is_singleton: true name: parse_row params: (src, idx, out_dev, fs = nil, rs = nil) visibility: public