Skip to content
New issue

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

Fix typo and improve in code-block of 'lib/pure/parseutils.nim' #13231

Merged
merged 1 commit into from
Jan 23, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/pure/parseutils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@
## import parseutils
## from strutils import Digits, parseInt
##
## let userInput1 = "2019 school start"
## let userInput2 = "3 years back"
## let input1 = "2019 school start"
## let input2 = "3 years back"
##
## let startYear = input1[0..skipWhile(input1, Digits)-1] # 2019
## let yearsBack = input2[0..skipWhile(input2, Digits)-1] # 3
##
## echo "Examination is in " & $(parseInt(startYear) + parseInt(yearsBack))
## # => Examination is in 2022
##
##
## **See also:**
Expand Down