U:RDoc::AnyMethod[iI"primitive_convert:ETI"*Encoding::Converter#primitive_convert;TF: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"possible opt elements:;To:RDoc::Markup::Verbatim; [ I"hash form: ;TI"U :partial_input => true # source buffer may be part of larger source ;TI"T :after_output => true # stop conversion after output before input ;TI"integer form: ;TI"* Encoding::Converter::PARTIAL_INPUT ;TI") Encoding::Converter::AFTER_OUTPUT ;T: @format0o; ; [I"possible results:;To; ; [ I":invalid_byte_sequence ;TI":incomplete_input ;TI":undefined_conversion ;TI":after_output ;TI":destination_buffer_full ;TI":source_buffer_empty ;TI":finished ;T; 0o; ; [I"Fprimitive_convert converts source_buffer into destination_buffer.;To:RDoc::Markup::BlankLineo; ; [I".source_buffer should be a string or nil. ;TI"nil means an empty string.;T@%o; ; [I"+destination_buffer should be a string.;T@%o; ; [I"9destination_byteoffset should be an integer or nil. ;TI".nil means the end of destination_buffer. ;TI"&If it is omitted, nil is assumed.;T@%o; ; [I"7destination_bytesize should be an integer or nil. ;TI"nil means unlimited. ;TI"&If it is omitted, nil is assumed.;T@%o; ; [I".opt should be nil, a hash or an integer. ;TI"nil means no flags. ;TI"&If it is omitted, nil is assumed.;T@%o; ; [I"Lprimitive_convert converts the content of source_buffer from beginning ;TI"2and store the result into destination_buffer.;T@%o; ; [I"Ndestination_byteoffset and destination_bytesize specify the region which ;TI"%the converted result is stored. ;TI"Ydestination_byteoffset specifies the start position in destination_buffer in bytes. ;TI"'If destination_byteoffset is nil, ;TI"Cdestination_buffer.bytesize is used for appending the result. ;TI"=destination_bytesize specifies maximum number of bytes. ;TI"%If destination_bytesize is nil, ;TI"$destination size is unlimited. ;TI"8After conversion, destination_buffer is resized to ;TI"Adestination_byteoffset + actually produced number of bytes. ;TI"GAlso destination_buffer's encoding is set to destination_encoding.;T@%o; ; [I"Bprimitive_convert drops the converted part of source_buffer. ;TI" [:finished, "", "\x00p\x00i"] ;TI" ;TI"7ec = Encoding::Converter.new("UTF-8", "UTF-16BE") ;TI":ret = ec.primitive_convert(src="pi", dst="", nil, 1) ;TI"Cp [ret, src, dst] #=> [:destination_buffer_full, "i", "\x00"] ;TI"5ret = ec.primitive_convert(src, dst="", nil, 1) ;TI"?p [ret, src, dst] #=> [:destination_buffer_full, "", "p"] ;TI"5ret = ec.primitive_convert(src, dst="", nil, 1) ;TI"Bp [ret, src, dst] #=> [:destination_buffer_full, "", "\x00"] ;TI"5ret = ec.primitive_convert(src, dst="", nil, 1) ;TI"/p [ret, src, dst] #=> [:finished, "", "i"];T; 0: @fileI"transcode.c;T:0@omit_headings_from_table_of_contents_below0I"ec.primitive_convert(source_buffer, destination_buffer) -> symbol ec.primitive_convert(source_buffer, destination_buffer, destination_byteoffset) -> symbol ec.primitive_convert(source_buffer, destination_buffer, destination_byteoffset, destination_bytesize) -> symbol ec.primitive_convert(source_buffer, destination_buffer, destination_byteoffset, destination_bytesize, opt) -> symbol ;T0[I"1(p1, p2, p3 = v3, p4 = v4, p5 = v5, p6 = {});T@FI"Converter;TcRDoc::NormalClass00