Sha256: 37384cfe2545cbced77e13cbed9965f522709ba2b94b9117f371d296602e0ac0
Contents?: true
Size: 446 Bytes
Versions: 63
Compression:
Stored size: 446 Bytes
Contents
module Mail # Extends each field parser with utility methods. module ParserTools #:nodoc: # Slice bytes from ASCII-8BIT data and mark as UTF-8. if 'string'.respond_to?(:force_encoding) def chars(data, from_bytes, to_bytes) data.slice(from_bytes..to_bytes).force_encoding(Encoding::UTF_8) end else def chars(data, from_bytes, to_bytes) data.slice(from_bytes..to_bytes) end end end end
Version data entries
63 entries across 49 versions & 13 rubygems