toChars overloads
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.
static
char*
toChars(
char* first,
char* last,
double value) noexcept;
» more...
Same as the preceding toChars overload, for float values.
static
char*
toChars(
char* first,
char* last,
float value) noexcept;
» more...
included. If the optionally specified baseargument 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)].
static
char*
toChars(
char* first,
char* last,
char value,
int base = 10) noexcept;
» 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.
static
char*
toChars(
char* first,
char* last,
double value,
Format format) noexcept;
» more...
Same as the preceding overload, for float values.
static
char*
toChars(
char* first,
char* last,
float value,
Format format) noexcept;
» more...
Format the specified signed integer value into [first, last)].
static
char*
toChars(
char* first,
char* last,
int value,
int base = 10) noexcept;
» more...
Format the specified signed long integer value into [first, last)].
static
char*
toChars(
char* first,
char* last,
long value,
int base = 10) noexcept;
» more...
Format the specified signed long long integer value into [first, last)].
static
char*
toChars(
char* first,
char* last,
long long value,
int base = 10) noexcept;
» more...
Format the specified signed short integer value into [first, last)].
static
char*
toChars(
char* first,
char* last,
short value,
int base = 10) noexcept;
» more...
Format the specified signed character value into [first, last)].
static
char*
toChars(
char* first,
char* last,
signed char value,
int base = 10) noexcept;
» more...
Format the specified unsigned character value into [first, last)].
static
char*
toChars(
char* first,
char* last,
unsigned char value,
int base = 10) noexcept;
» more...
Format the specified unsigned integer value into [first, last)].
static
char*
toChars(
char* first,
char* last,
unsigned int value,
int base = 10) noexcept;
» more...
Format the specified unsigned long integer value into [first, last)].
static
char*
toChars(
char* first,
char* last,
unsigned long value,
int base = 10) noexcept;
» more...
Format the specified unsigned long long integer value into [first, last)].
static
char*
toChars(
char* first,
char* last,
unsigned long long value,
int base = 10) noexcept;
» more...
Format the specified integer value into [first, last)] and return the end iterator.
static
char*
toChars(
char* first,
char* last,
unsigned short value,
int base = 10) noexcept;
» 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.
static
char*
toChars(
char* first,
char* last,
double value,
Format format,
int precision) noexcept;
» more...
Format the specified float value into [first, last)].
static
char*
toChars(
char* first,
char* last,
float value,
Format format,
int precision) noexcept;
» more...