diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-09-13 01:33:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-12 13:33:47 -0400 |
commit | c9a92117f9b78e3227dfe2cdcc7cf5b113185832 (patch) | |
tree | 436d5449fdd999003e7b43b83880d8ef252b404d /lib/pure/strutils.nim | |
parent | 6bf21e7b3dbf203baf23069c33bd79545681f466 (diff) | |
download | Nim-c9a92117f9b78e3227dfe2cdcc7cf5b113185832.tar.gz |
Revert "add `fromChar`" (#20336)
Revert "add `fromChar` (#20332)" This reverts commit 846cc746a2350ad3f845a4eb0ce97b864891cd35.
Diffstat (limited to 'lib/pure/strutils.nim')
-rw-r--r-- | lib/pure/strutils.nim | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/pure/strutils.nim b/lib/pure/strutils.nim index ea42c4403..3b315e564 100644 --- a/lib/pure/strutils.nim +++ b/lib/pure/strutils.nim @@ -997,15 +997,6 @@ func toOctal*(c: char): string {.rtl, extern: "nsuToOctal".} = result[i] = chr(val mod 8 + ord('0')) val = val div 8 -func fromChar[T: SomeInteger](ch: char): T = - runnableExamples: - assert fromChar[int8]('6') == 6 - doAssertRaises AssertionDefect: - fromChar[int8]('a') - - assert isDigit(ch) - T(ord(ch) - ord('0')) - func fromBin*[T: SomeInteger](s: string): T = ## Parses a binary integer value from a string `s`. ## |