We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parseInt accepts an initial sign and any number of underscores after the first digit, but the documentation does not mention this.
import std/parseutils var res: int echo parseInt("-123", res) echo res echo parseInt("+123", res) echo res discard parseInt("1__2__3____", res) echo res
Nim Compiler Version 2.1.1 [Linux: amd64] Compiled at 2024-04-17 Copyright (c) 2006-2024 by Andreas Rumpf
git hash: 20698b8 active boot switches: -d:release
4 -123 4 123 123
the same output
Document what is accepted as input.
No response
The text was updated successfully, but these errors were encountered:
fixes nim-lang#23513, parseutils.nim: parseInt's doc example.
999837c
Also, the old `runnableExample` is just a copy of `proc parseInt(openArray[char], var int, int)` variant (in Line 1000).
Successfully merging a pull request may close this issue.
Description
parseInt accepts an initial sign and any number of underscores after the first digit, but the documentation does not mention this.
Nim Version
Nim Compiler Version 2.1.1 [Linux: amd64]
Compiled at 2024-04-17
Copyright (c) 2006-2024 by Andreas Rumpf
git hash: 20698b8
active boot switches: -d:release
Current Output
Expected Output
Possible Solution
Document what is accepted as input.
Additional Information
No response
The text was updated successfully, but these errors were encountered: