[#BloombergLP-bdlt-Iso8601Util-parse-04a]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/Iso8601Util.adoc[Iso8601Util]::parse
:relfileprefix: ../../../
:mrdocs:

Parse the specified ISO 8601 `string` as a `bsls&colon;&colon;TimeInterval` value, and load the value into the specified `result`&period; Return 0 on success, and a non&hyphen;zero value (with no effect) otherwise&period; `string` is assumed to be of the form&colon; &grave; &lt;Parsed Duration&gt; &grave; See &quot;Summary of Supported ISO 8601 Duration Representations&quot; for a complete description of this format&period;

== Synopsis

Declared in `&lt;bdlt&lowbar;iso8601util&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
int
parse(
    xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval]* result,
    std::string&lowbar;view const& string);
----

== Description

_Exactly_ `string&period;length()` characters are parsed&semi; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string&period;length()` characters do not&period; If an optional fractional second having more than nine digits is present in `string`, it is rounded to the nearest value in nanoseconds&period; The behavior is undefined unless `0 &lt;&equals; length`&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
