Module: Mail::ParserTools

Overview

Extends each field parser with utility methods.

Instance Method Summary collapse

Instance Method Details

#chars(data, from_bytes, to_bytes) ⇒ Object


6
7
8
# File 'lib/mail/parser_tools.rb', line 6

def chars(data, from_bytes, to_bytes)
  data.slice(from_bytes..to_bytes).force_encoding(Encoding::UTF_8)
end