• Home
  • Raw
  • Download

Lines Matching +full:no +full:- +full:trailing +full:- +full:spaces

4 // From the double-conversion library. Original license:
24 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
42 #include "double-conversion-utils.h"
68 // Flags should be a bit-or combination of the possible Flags-enum.
69 // - NO_FLAGS: no special flags.
70 // - ALLOW_HEX: recognizes the prefix "0x". Hex numbers may only be integers.
71 // Ex: StringToDouble("0x1234") -> 4660.0
72 // In StringToDouble("0x1234.56") the characters ".56" are trailing
75 // With this flag "0x" is a junk-string. Even with ALLOW_TRAILING_JUNK,
78 // - ALLOW_OCTALS: recognizes the prefix "0" for octals:
81 // Ex: StringToDouble("01234") -> 668.0
82 // StringToDouble("012349") -> 12349.0 // Not a sequence of octal
84 // In StringToDouble("01234.56") the characters ".56" are trailing
87 // In StringToDouble("01234e56") the characters "e56" are trailing
89 // - ALLOW_TRAILING_JUNK: ignore trailing characters that are not part of
91 // - ALLOW_LEADING_SPACES: skip over leading whitespace, including spaces,
92 // new-lines, and tabs.
93 // - ALLOW_TRAILING_SPACES: ignore trailing whitespace.
94 // - ALLOW_SPACES_AFTER_SIGN: ignore whitespace after the sign.
95 // Ex: StringToDouble("- 123.2") -> -123.2.
96 // StringToDouble("+ 123.2") -> 123.2
97 // - ALLOW_CASE_INSENSITIVITY: ignore case of characters for special values:
99 // - ALLOW_HEX_FLOATS: allows hexadecimal float literals.
107 // containing only spaces is converted to the 'empty_string_value', too.
111 // part of a double-literal) is found.
119 // following character of the input-string with the first character of
120 // the infinity, and nan-symbol. If either matches, the function assumes, that
122 // the remaining characters of the special-value symbol.
123 // This means that the following restrictions apply to special-value symbols:
124 // - they must not start with signs ('+', or '-'),
125 // - they must not have the same first character.
126 // - they must not start with digits.
140 // StringToDouble("0x1234") -> 4660.0.
141 // StringToDouble("0x1234K") -> 4660.0.
142 // StringToDouble("") -> 0.0 // empty_string_value.
143 // StringToDouble(" ") -> NaN // junk_string_value.
144 // StringToDouble(" 1") -> NaN // junk_string_value.
145 // StringToDouble("0x") -> NaN // junk_string_value.
146 // StringToDouble("-123.45") -> -123.45.
147 // StringToDouble("--123.45") -> NaN // junk_string_value.
148 // StringToDouble("123e45") -> 123e45.
149 // StringToDouble("123E45") -> 123e45.
150 // StringToDouble("123e+45") -> 123e45.
151 // StringToDouble("123E-45") -> 123e-45.
152 // StringToDouble("123e") -> 123.0 // trailing junk ignored.
153 // StringToDouble("123e-") -> 123.0 // trailing junk ignored.
154 // StringToDouble("+NaN") -> NaN // NaN string literal.
155 // StringToDouble("-infinity") -> -inf. // infinity literal.
156 // StringToDouble("Infinity") -> NaN // junk_string_value.
163 // StringToDouble("0x1234") -> NaN // junk_string_value.
164 // StringToDouble("01234") -> 668.0.
165 // StringToDouble("") -> 0.0 // empty_string_value.
166 // StringToDouble(" ") -> 0.0 // empty_string_value.
167 // StringToDouble(" 1") -> 1.0
168 // StringToDouble("0x") -> NaN // junk_string_value.
169 // StringToDouble("0123e45") -> NaN // junk_string_value.
170 // StringToDouble("01239E45") -> 1239e45.
171 // StringToDouble("-infinity") -> NaN // junk_string_value.
172 // StringToDouble("NaN") -> NaN // junk_string_value.
176 // StringToDouble("1 2 3 4") -> 1234.0
177 // StringToDouble("1 2") -> NaN // junk_string_value
178 // StringToDouble("1 000 000.0") -> 1000000.0
179 // StringToDouble("1.000 000") -> 1.0
180 // StringToDouble("1.0e1 000") -> NaN // junk_string_value
198 // Spaces than are processed with ALLOW_{LEADING|TRAILING}_SPACES are included
199 // in the 'processed_characters_count'. Trailing junk is never included.
211 // due to potential double-rounding.