go/src/strconv
Robert Griesemer 8740bdc5af strconv: fix for parseFloatPrefix
parseFloatPrefix accepts a string if it has a valid floating-point
number as prefix. Make sure that "infi", "infin", ... etc. are
accepted as valid numbers "inf" with suffix "i", "in", etc. This
is important for parsing complex numbers such as "0+infi".

This change does not affect the correctness of ParseFloat because
ParseFloat rejects strings that contain a suffix after a valid
floating-point number.

Updates #36771.

Change-Id: Ie1693a8ca2f8edf07b57688e0b35751b7100d39d
Reviewed-on: https://go-review.googlesource.com/c/go/+/231237
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2020-04-30 21:34:51 +00:00
..
testdata
atob.go strconv: add missing period to godoc comment 2018-06-09 01:26:25 +00:00
atob_test.go
atof.go strconv: fix for parseFloatPrefix 2020-04-30 21:34:51 +00:00
atof_test.go strconv: fix for parseFloatPrefix 2020-04-30 21:34:51 +00:00
atoi.go strconv: remove redundant conversions to int 2020-04-27 21:46:18 +00:00
atoi_test.go strconv: add Unwrap to custom error types 2019-09-30 21:07:51 +00:00
decimal.go
decimal_test.go
doc.go strconv: add missing package name into doc.go(godoc overview) 2018-12-30 18:30:11 +00:00
example_test.go strconv: reformat and tidy comments in example 2019-11-11 19:56:33 +00:00
export_test.go
extfloat.go strconv: add comment re extFloat errorscale 2020-04-11 23:08:34 +00:00
fp_test.go
ftoa.go strconv: fix rounding in FormatFloat fallback path 2019-05-23 15:41:19 +00:00
ftoa_test.go strconv: fix rounding in FormatFloat fallback path 2019-05-23 15:41:19 +00:00
internal_test.go strconv: implement parseFloatPrefix returning no. of bytes consumed 2020-04-30 03:50:03 +00:00
isprint.go unicode: upgrade to Unicode 12 2019-11-05 14:34:56 +00:00
itoa.go strconv: make docs for Itoa and Atoi slightly higher level 2018-12-31 22:48:43 +00:00
itoa_test.go
makeisprint.go
quote.go strconv: stop describing Unicode graphic characters as non-ASCII 2020-01-26 20:38:34 +00:00
quote_test.go all: avoid string(i) where i has type int 2020-02-26 04:38:19 +00:00
strconv_test.go strconv: pre-allocate in appendQuotedWith 2019-04-18 04:30:46 +00:00