Skip to content

Commit

Permalink
[backport] Fix typo and improve in code-block of 'lib/pure/parseutils…
Browse files Browse the repository at this point in the history
….nim' (nim-lang#13231) [ci skip]
  • Loading branch information
albmelon authored and narimiran committed Jan 23, 2020
1 parent 7356bc2 commit 4a754ff
Showing 1 changed file with 3 additions and 2 deletions.
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

0 comments on commit 4a754ff

Please sign in to comment.