#include <bslalg_numericformatterutil.h>
|
static char * | toChars (char *first, char *last, char value, int base=10) BSLS_KEYWORD_NOEXCEPT |
|
static char * | toChars (char *first, char *last, signed char value, int base=10) BSLS_KEYWORD_NOEXCEPT |
|
static char * | toChars (char *first, char *last, unsigned char value, int base=10) BSLS_KEYWORD_NOEXCEPT |
|
static char * | toChars (char *first, char *last, signed short int value, int base=10) BSLS_KEYWORD_NOEXCEPT |
|
static char * | toChars (char *first, char *last, unsigned short int value, int base=10) BSLS_KEYWORD_NOEXCEPT |
|
static char * | toChars (char *first, char *last, signed int value, int base=10) BSLS_KEYWORD_NOEXCEPT |
|
static char * | toChars (char *first, char *last, unsigned int value, int base=10) BSLS_KEYWORD_NOEXCEPT |
|
static char * | toChars (char *first, char *last, signed long int value, int base=10) BSLS_KEYWORD_NOEXCEPT |
|
static char * | toChars (char *first, char *last, unsigned long int value, int base=10) BSLS_KEYWORD_NOEXCEPT |
|
static char * | toChars (char *first, char *last, signed long long int value, int base=10) BSLS_KEYWORD_NOEXCEPT |
|
static char * | toChars (char *first, char *last, unsigned long long int value, int base=10) BSLS_KEYWORD_NOEXCEPT |
|
static char * | toChars (char *first, char *last, double value) BSLS_KEYWORD_NOEXCEPT |
|
static char * | toChars (char *first, char *last, float value) BSLS_KEYWORD_NOEXCEPT |
|
static char * | toChars (char *first, char *last, double value, Format format) BSLS_KEYWORD_NOEXCEPT |
|
static char * | toChars (char *first, char *last, float value, Format format) BSLS_KEYWORD_NOEXCEPT |
|
◆ Format
Enumerator |
---|
e_SCIENTIFIC | |
e_FIXED | |
◆ toChars() [1/15]
char * bslalg::NumericFormatterUtil::toChars |
( |
char * |
first, |
|
|
char * |
last, |
|
|
char |
value, |
|
|
int |
base = 10 |
|
) |
| |
|
inlinestatic |
Write the specified value
into the character buffer starting a the specified first
and ending at the specified last
, last
not included. In integer conversions, if the optionally specified base
argument is not present or specified, base 10 is used. In floating point conversions, if the optionally specified format
argument is not present or specified, the {Default Floating Point Format} is used. If a format
argument is specified (e_DECIMAL
or e_SCIENTIFIC
), the {Shortest (Textual) Decimal Representation for Binary Floating Point Values} is 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
, 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.
◆ toChars() [2/15]
static char * bslalg::NumericFormatterUtil::toChars |
( |
char * |
first, |
|
|
char * |
last, |
|
|
double |
value |
|
) |
| |
|
static |
◆ toChars() [3/15]
char * bslalg::NumericFormatterUtil::toChars |
( |
char * |
first, |
|
|
char * |
last, |
|
|
double |
value, |
|
|
Format |
format |
|
) |
| |
|
inlinestatic |
◆ toChars() [4/15]
static char * bslalg::NumericFormatterUtil::toChars |
( |
char * |
first, |
|
|
char * |
last, |
|
|
float |
value |
|
) |
| |
|
static |
◆ toChars() [5/15]
char * bslalg::NumericFormatterUtil::toChars |
( |
char * |
first, |
|
|
char * |
last, |
|
|
float |
value, |
|
|
Format |
format |
|
) |
| |
|
inlinestatic |
◆ toChars() [6/15]
char * bslalg::NumericFormatterUtil::toChars |
( |
char * |
first, |
|
|
char * |
last, |
|
|
signed char |
value, |
|
|
int |
base = 10 |
|
) |
| |
|
inlinestatic |
◆ toChars() [7/15]
char * bslalg::NumericFormatterUtil::toChars |
( |
char * |
first, |
|
|
char * |
last, |
|
|
signed int |
value, |
|
|
int |
base = 10 |
|
) |
| |
|
inlinestatic |
◆ toChars() [8/15]
char * bslalg::NumericFormatterUtil::toChars |
( |
char * |
first, |
|
|
char * |
last, |
|
|
signed long int |
value, |
|
|
int |
base = 10 |
|
) |
| |
|
inlinestatic |
◆ toChars() [9/15]
char * bslalg::NumericFormatterUtil::toChars |
( |
char * |
first, |
|
|
char * |
last, |
|
|
signed long long int |
value, |
|
|
int |
base = 10 |
|
) |
| |
|
inlinestatic |
◆ toChars() [10/15]
char * bslalg::NumericFormatterUtil::toChars |
( |
char * |
first, |
|
|
char * |
last, |
|
|
signed short int |
value, |
|
|
int |
base = 10 |
|
) |
| |
|
inlinestatic |
◆ toChars() [11/15]
char * bslalg::NumericFormatterUtil::toChars |
( |
char * |
first, |
|
|
char * |
last, |
|
|
unsigned char |
value, |
|
|
int |
base = 10 |
|
) |
| |
|
inlinestatic |
◆ toChars() [12/15]
char * bslalg::NumericFormatterUtil::toChars |
( |
char * |
first, |
|
|
char * |
last, |
|
|
unsigned int |
value, |
|
|
int |
base = 10 |
|
) |
| |
|
inlinestatic |
◆ toChars() [13/15]
char * bslalg::NumericFormatterUtil::toChars |
( |
char * |
first, |
|
|
char * |
last, |
|
|
unsigned long int |
value, |
|
|
int |
base = 10 |
|
) |
| |
|
inlinestatic |
◆ toChars() [14/15]
char * bslalg::NumericFormatterUtil::toChars |
( |
char * |
first, |
|
|
char * |
last, |
|
|
unsigned long long int |
value, |
|
|
int |
base = 10 |
|
) |
| |
|
inlinestatic |
◆ toChars() [15/15]
char * bslalg::NumericFormatterUtil::toChars |
( |
char * |
first, |
|
|
char * |
last, |
|
|
unsigned short int |
value, |
|
|
int |
base = 10 |
|
) |
| |
|
inlinestatic |
The documentation for this struct was generated from the following file: