[#BloombergLP-bslalg-NumericFormatterUtil-toChars-060] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/NumericFormatterUtil.adoc[NumericFormatterUtil]::toChars :relfileprefix: ../../../ :mrdocs: `toChars` overloads == Synopses Declared in `<bslalg_numericformatterutil.h>` Write the specified floating point `value` into the character buffer starting a the specified `first` and ending at the specified `last`, `last` not included. Use the {Default Floating Point Format}. Return the address one past the last character (lowest order digit or last digit of the exponent) written on success, or `0` on failure. The only reason for failure is when the range `[ first, last )]` is not large enough to contain the result. The written result is to begin at `first` with leftover room following the return value. The behavior is undefined unless `first <= last`. Note that these functions do *not* null‐terminate the result. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-0c.adoc[toChars]( char* first, char* last, double value) noexcept; ---- [.small]#xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-0c.adoc[_» more..._]# Same as the preceding `toChars` overload, for `float` values. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-05b.adoc[toChars]( char* first, char* last, float value) noexcept; ---- [.small]#xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-05b.adoc[_» more..._]# included. If the optionally specified `base`argument is not present base 10 is used. Return the address one past the last character (lowest order digit or last digit of the exponent) written on success, or `0` on failure. The only reason for failure is when the range `[ first, last )]` is not large enough to contain the result. The written result is to begin at `first` with leftover room following the return value. The behavior is undefined unless `first <= last`, and `base` is in the range `[ 2 .. 36 ]`. Note that the type `bool` for the `value` parameter is explicitly disabled in the "NOT IMPLEMENTED" `private` section, because `bool` would otherwise be promoted to `int` and printed as `0` or `1`, instead of the (possibly) expected `false` and `true`; and `bool` is not an integral or numeric type either. Also note that these functions do *not* null‐terminate the result. Format the specified character `value` into `[first, last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-007.adoc[toChars]( char* first, char* last, char value, int base = 10) noexcept; ---- [.small]#xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-007.adoc[_» more..._]# 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 {Shortest (Textual) Decimal Representation for Binary Floating Point Values} 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 {Special Floating Point Values}. Return the address one past the last character (lowest order digit or last digit of the exponent) written on success, or `0` on failure. The only reason for failure is when the range `[ first, last )]` is not large enough to contain the result. The written result is to begin at `first` with leftover room following the return value. The behavior is undefined unless `first <= last`. Note that these functions do *not* null‐terminate the result. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-01.adoc[toChars]( char* first, char* last, double value, xref:BloombergLP/bslalg/NumericFormatterUtil/Format.adoc[Format] format) noexcept; ---- [.small]#xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-01.adoc[_» more..._]# Same as the preceding overload, for `float` values. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-04.adoc[toChars]( char* first, char* last, float value, xref:BloombergLP/bslalg/NumericFormatterUtil/Format.adoc[Format] format) noexcept; ---- [.small]#xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-04.adoc[_» more..._]# Format the specified signed integer `value` into `[first, last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-03.adoc[toChars]( char* first, char* last, int value, int base = 10) noexcept; ---- [.small]#xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-03.adoc[_» more..._]# Format the specified signed long integer `value` into `[first, last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-005.adoc[toChars]( char* first, char* last, long value, int base = 10) noexcept; ---- [.small]#xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-005.adoc[_» more..._]# Format the specified signed long long integer `value` into `[first, last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-08.adoc[toChars]( char* first, char* last, long long value, int base = 10) noexcept; ---- [.small]#xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-08.adoc[_» more..._]# Format the specified signed short integer `value` into `[first, last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-0a1.adoc[toChars]( char* first, char* last, short value, int base = 10) noexcept; ---- [.small]#xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-0a1.adoc[_» more..._]# Format the specified signed character `value` into `[first, last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-0f.adoc[toChars]( char* first, char* last, signed char value, int base = 10) noexcept; ---- [.small]#xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-0f.adoc[_» more..._]# Format the specified unsigned character `value` into `[first, last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-0b.adoc[toChars]( char* first, char* last, unsigned char value, int base = 10) noexcept; ---- [.small]#xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-0b.adoc[_» more..._]# Format the specified unsigned integer `value` into `[first, last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-0d1.adoc[toChars]( char* first, char* last, unsigned int value, int base = 10) noexcept; ---- [.small]#xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-0d1.adoc[_» more..._]# Format the specified unsigned long integer `value` into `[first, last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-068.adoc[toChars]( char* first, char* last, unsigned long value, int base = 10) noexcept; ---- [.small]#xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-068.adoc[_» more..._]# Format the specified unsigned long long integer `value` into `[first, last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-058.adoc[toChars]( char* first, char* last, unsigned long long value, int base = 10) noexcept; ---- [.small]#xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-058.adoc[_» more..._]# Format the specified integer `value` into `[first, last)]` and return the end iterator. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-069.adoc[toChars]( char* first, char* last, unsigned short value, int base = 10) noexcept; ---- [.small]#xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-069.adoc[_» more..._]# 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` and `precision`. Return the address one past the last character (lowest order digit or last digit of the exponent) written on success, or `0` on failure. The only reason for failure is when the range `[ first, last )]` is not large enough to contain the result. The written result is to begin at `first` with leftover room following the return value. The behavior is undefined unless `first <= last`. Note that these functions do *not* null‐terminate the result. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-0d7.adoc[toChars]( char* first, char* last, double value, xref:BloombergLP/bslalg/NumericFormatterUtil/Format.adoc[Format] format, int precision) noexcept; ---- [.small]#xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-0d7.adoc[_» more..._]# Format the specified `float` `value` into `[first, last)]`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static char* xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-0aa.adoc[toChars]( char* first, char* last, float value, xref:BloombergLP/bslalg/NumericFormatterUtil/Format.adoc[Format] format, int precision) noexcept; ---- [.small]#xref:BloombergLP/bslalg/NumericFormatterUtil/toChars-0aa.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#