[#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::TimeInterval` value, and load the value into the specified `result`. Return 0 on success, and a non‐zero value (with no effect) otherwise. `string` is assumed to be of the form: ` <Parsed Duration> ` See "Summary of Supported ISO 8601 Duration Representations" for a complete description of this format. == Synopsis Declared in `<bdlt_iso8601util.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static int parse( xref:BloombergLP/bsls/TimeInterval.adoc[bsls::TimeInterval]* result, std::string_view const& string); ---- == Description _Exactly_ `string.length()` characters are parsed; parsing will fail if a proper prefix of `string` matches the expected format, but the entire `string.length()` characters do not. If an optional fractional second having more than nine digits is present in `string`, it is rounded to the nearest value in nanoseconds. The behavior is undefined unless `0 <= length`. [.small]#Created with https://www.mrdocs.com[MrDocs]#