strconv: document parsing of leading +, and interaction between sign and base prefix #46641
Labels
Documentation
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
The
strconv.ParseInt
documentation does not state that a leading+
is permitted in the input string. This seems worth mentioning.The documentation states that the input string's prefix indicates the base when the base argument is 0, but does not state that the base prefix must follow the sign when present. (e.g.,
"-0xf"
, not"0x-f"
.) "The string's prefix" is not quite accurate; perhaps this should state "the string's prefix following the sign".Possibly
strconv.ParseUint
should explicitly document that it does not accept a leading+
.Also, we don't seem to have any test coverage for leading
+
characters inParseInt
/ParseUint
input.The text was updated successfully, but these errors were encountered: