[#BloombergLP-bslalg-NumericFormatterUtil-toChars-01]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/NumericFormatterUtil.adoc[NumericFormatterUtil]::toChars
:relfileprefix: ../../../
:mrdocs:

Write the specified floating point `value` into the character buffer starting a the specified `first` and ending at the specified `last`, `last` not included, using the specified `format` with the &lcub;Shortest (Textual) Decimal Representation for Binary Floating Point Values&rcub; used in that format (that will produce the exact binary floating point `value` when converted back to the original type from text), but see possible exceptions under &lcub;Special Floating Point Values&rcub;&period; Return the address one past the last character (lowest order digit or last digit of the exponent) written on success, or `0` on failure&period; The only reason for failure is when the range `&lsqb; first, last )&rsqb;` is not large enough to contain the result&period; The written result is to begin at `first` with leftover room following the return value&period; The behavior is undefined unless `first &lt;&equals; last`&period; Note that these functions do *not* null&hyphen;terminate the result&period;

== Synopsis

Declared in `&lt;bslalg&lowbar;numericformatterutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
char*
toChars(
    char* first,
    char* last,
    double value,
    xref:BloombergLP/bslalg/NumericFormatterUtil/Format.adoc[Format] format) noexcept;
----


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