headerGetItems

 

SYNOPSIS

varchar headerGetItems(varchar header)

Parameters:

  • header - A raw varchar header value

Returns:

  • The raw (original encoded) list of CSV items, as a varstrlst


DESCRIPTION
The headerGetItems function splits the raw (original encoded) CSV header value into a list of raw (original encoded) values, returning a varstrlst list. Commas inside double-quoted, single-quoted, or angle-bracketed values are not considered items separators. Leading and trailing whitespace from each item is stripped.


EXAMPLE

<$toHdr = '"Smith, John" <jsmith@foo.com>, <jdoe@bar.com> Jane Doe'>
  <$ret = (headerGetItems($toHdr))>
  Mailboxes: <loop $ret> [$ret] </loop><fmt "\n">

The output would be:

Mailboxes: ["Smith, John" <jsmith@foo.com>] [<jdoe@bar.com> Jane Doe]


CAVEATS
The returned items are not RFC 2047 decoded, because further parsing might be done (e.g. getting parameter names and values). Use headerDecode (here) for RFC 2047 encoded-word deoding.


SEE ALSO
headerDecode, headerItemGetParameterValues


Copyright © Thunderstone Software     Last updated: Sep 25 2019
Copyright © 2019 Thunderstone Software LLC. All rights reserved.