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

included&period; If the optionally specified `base`argument is not present base 10 is used&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`, and `base` is in the range `&lsqb; 2 &period;&period; 36 &rsqb;`&period; Note that the type `bool` for the `value` parameter is explicitly disabled in the &quot;NOT IMPLEMENTED&quot; `private` section, because `bool` would otherwise be promoted to `int` and printed as `0` or `1`, instead of the (possibly) expected `false` and `true`&semi; and `bool` is not an integral or numeric type either&period; Also note that these functions do *not* null&hyphen;terminate the result&period; Format the specified character `value` into `&lsqb;first, last)&rsqb;`&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,
    char value,
    int base = 10) noexcept;
----


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