I will use parseFloat and parseInt in strutils [https://play.nim-lang.org/#ix=2bVE](https://play.nim-lang.org/#ix=2bVE) import strutils proc isNumberic*(value: string): bool = result = true try: discard parseInt(value) except ValueError: try: discard parseFloat(value) except ValueError: result = false assert isNumberic("-42.3") assert isNumberic("3") assert not isNumberic("zs") Run
- How does one check if a string is numeric? adnan
- Re: How does one check if a string is numeric? xflywind
- Re: How does one check if a string is numeric? Stefan_Salewski
- Re: How does one check if a string is numeric... ThomasTJdev
- Re: How does one check if a string is num... adnan
- Re: How does one check if a string i... adnan
- Re: How does one check if a stri... adnan
- Re: How does one check if a ... xflywind
- Re: How does one check if a ... Stefan_Salewski
- Re: How does one check if a ... Araq
- Re: How does one check if a ... adnan
- Re: How does one check if a ... cblake
