Method MIME.tokenize_labled()

Method tokenize_labled

array(array(string|int)) tokenize_labled(string header, int|void flags)


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:


Keep backslash-escapes in quoted-strings.

The following labels exist:


Word encoded according to =?...


Special character.




Domain literal.



See also

MIME.quote(), tokenize(), decode_words_tokenized_labled_remapped()