Skip to content

Commit 1403169

Browse files
committed
Implement digit separator skipping in exponent parsing
1 parent c3b634e commit 1403169

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

include/fast_float/ascii_number.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,14 @@ parse_number_string(UC const *p, UC const *pend,
463463
// Otherwise, we will be ignoring the 'e'.
464464
p = location_of_e;
465465
} else {
466-
while ((p != pend) && is_integer(*p)) {
466+
while (p != pend) {
467+
if (has_separator && *p == separator) {
468+
++p;
469+
continue;
470+
}
471+
if (!is_integer(*p)) {
472+
break;
473+
}
467474
uint8_t digit = uint8_t(*p - UC('0'));
468475
if (exp_number < 0x10000000) {
469476
exp_number = 10 * exp_number + digit;

0 commit comments

Comments
 (0)