28#ifndef DOUBLE_CONVERSION_DOUBLE_TO_STRING_H_
29#define DOUBLE_CONVERSION_DOUBLE_TO_STRING_H_
166 const char* infinity_symbol,
167 const char* nan_symbol,
168 char exponent_character,
169 int decimal_in_shortest_low,
170 int decimal_in_shortest_high,
171 int max_leading_padding_zeroes_in_precision_mode,
172 int max_trailing_padding_zeroes_in_precision_mode,
173 int min_exponent_width = 0)
175 infinity_symbol_(infinity_symbol),
176 nan_symbol_(nan_symbol),
177 exponent_character_(exponent_character),
178 decimal_in_shortest_low_(decimal_in_shortest_low),
179 decimal_in_shortest_high_(decimal_in_shortest_high),
180 max_leading_padding_zeroes_in_precision_mode_(
181 max_leading_padding_zeroes_in_precision_mode),
182 max_trailing_padding_zeroes_in_precision_mode_(
183 max_trailing_padding_zeroes_in_precision_mode),
184 min_exponent_width_(min_exponent_width) {
248 return ToShortestIeeeNumber(value, result_builder,
SHORTEST);
299 int requested_digits,
333 int requested_digits,
437 int requested_digits,
446 bool ToShortestIeeeNumber(
double value,
454 bool HandleSpecialValues(
double value,
StringBuilder* result_builder)
const;
457 void CreateExponentialRepresentation(
const char* decimal_digits,
462 void CreateDecimalRepresentation(
const char* decimal_digits,
465 int digits_after_point,
469 const char*
const infinity_symbol_;
470 const char*
const nan_symbol_;
471 const char exponent_character_;
472 const int decimal_in_shortest_low_;
473 const int decimal_in_shortest_high_;
474 const int max_leading_padding_zeroes_in_precision_mode_;
475 const int max_trailing_padding_zeroes_in_precision_mode_;
476 const int min_exponent_width_;
sign
Definition base.h:689
bool ToPrecision(double value, int precision, StringBuilder *result_builder) const
DtoaMode
Definition double-to-string.h:377
@ SHORTEST_SINGLE
Definition double-to-string.h:383
@ PRECISION
Definition double-to-string.h:389
@ FIXED
Definition double-to-string.h:387
@ SHORTEST
Definition double-to-string.h:381
static const int kMinPrecisionDigits
Definition double-to-string.h:50
static const int kMaxExponentialDigits
Definition double-to-string.h:45
bool ToExponential(double value, int requested_digits, StringBuilder *result_builder) const
static const int kBase10MaximalLengthSingle
Definition double-to-string.h:65
Flags
Definition double-to-string.h:75
@ NO_FLAGS
Definition double-to-string.h:76
@ NO_TRAILING_ZERO
Definition double-to-string.h:81
@ EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL
Definition double-to-string.h:82
@ EMIT_POSITIVE_EXPONENT_SIGN
Definition double-to-string.h:77
@ EMIT_TRAILING_DECIMAL_POINT
Definition double-to-string.h:78
@ EMIT_TRAILING_ZERO_AFTER_POINT
Definition double-to-string.h:79
@ UNIQUE_ZERO
Definition double-to-string.h:80
@ EMIT_TRAILING_ZERO_AFTER_POINT_IN_EXPONENTIAL
Definition double-to-string.h:83
static const int kBase10MaximalLength
Definition double-to-string.h:59
static void DoubleToAscii(double v, DtoaMode mode, int requested_digits, char *buffer, int buffer_length, bool *sign, int *length, int *point)
static const int kMaxPrecisionDigits
Definition double-to-string.h:51
static const int kMaxFixedDigitsAfterPoint
Definition double-to-string.h:41
bool ToFixed(double value, int requested_digits, StringBuilder *result_builder) const
DoubleToStringConverter(int flags, const char *infinity_symbol, const char *nan_symbol, char exponent_character, int decimal_in_shortest_low, int decimal_in_shortest_high, int max_leading_padding_zeroes_in_precision_mode, int max_trailing_padding_zeroes_in_precision_mode, int min_exponent_width=0)
Definition double-to-string.h:165
static const int kMaxCharsEcmaScriptShortest
Definition double-to-string.h:73
static const DoubleToStringConverter & EcmaScriptConverter()
bool ToShortestSingle(float value, StringBuilder *result_builder) const
Definition double-to-string.h:258
static const int kMaxFixedDigitsBeforePoint
Definition double-to-string.h:40
bool ToShortest(double value, StringBuilder *result_builder) const
Definition double-to-string.h:247
#define DOUBLE_CONVERSION_ASSERT(condition)
Definition utils.h:46
#define DOUBLE_CONVERSION_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName)
Definition utils.h:231