mime::addr_x400 (private)

 mime::addr_x400 mbox key

Defined in packages/acs-tcl/tcl/tcllib-doc-procs.tcl

Extract a keyed attribute from an X.400 mailbox representation for the internal MIME address parser. This helper is not a public API.

Parameters:
mbox (required)
X.400 mailbox representation.
key (required)
Attribute key to find, matched without case distinctions.
Returns:
Attribute value with surrounding quotes trimmed, or an empty string if the key is absent.

Partial Call Graph (max 5 caller/called nodes):
mime::parseaddressaux mime::parseaddressaux (private) mime::addr_x400 mime::addr_x400 mime::parseaddressaux->mime::addr_x400

Testcases:
No testcase defined.
Source code:
    if {[set x [string first /$key= [string toupper $mbox]]] < 0} {
        return {}
    }
    set mbox [string range $mbox [expr {$x + [string length $key] + 2}] end]

    if {[set x [string first / $mbox]] > 0} {
        set mbox [string range $mbox 0 [expr {$x - 1}]]
    }

    return [string trim $mbox \"]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: