How to convert a string to an int in Nim

You can convert a string to an integer in Nim using the parseInt procedure:

import strutils
echo parseInt("5") + 4

Running this yields:

9

Comments

Leave a comment

What color are brown eyes? (spam prevention)
Submit
Code under MIT License unless otherwise indicated.
© 2020, Downranked, LLC.