Method MIME.tokenize_labled()
- Method
tokenize_labled
array
(array
(string
|int
)) tokenize_labled(string
header
,int
|void
flags
)- Description
Similar to tokenize(), but labels the contents, by making arrays with two elements; the first a label, and the second the value that tokenize() would have put there, except for that comments are kept.
- Parameter
header
The header value to parse.
- Parameter
flags
An optional set of flags. Currently only one flag is defined:
TOKENIZE_KEEP_ESCAPES
Keep backslash-escapes in quoted-strings.
The following labels exist:
"encoded-word"
Word encoded according to =?...
"special"
Special character.
"word"
Word.
"domain-literal"
Domain literal.
"comment"
Comment.
- See also
MIME.quote(), tokenize(), decode_words_tokenized_labled_remapped()