summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2022-09-13 01:33:47 +0800
committerGitHub <noreply@github.com>2022-09-12 13:33:47 -0400
commitc9a92117f9b78e3227dfe2cdcc7cf5b113185832 (patch)
tree436d5449fdd999003e7b43b83880d8ef252b404d /lib
parent6bf21e7b3dbf203baf23069c33bd79545681f466 (diff)
downloadNim-c9a92117f9b78e3227dfe2cdcc7cf5b113185832.tar.gz
Revert "add `fromChar`" (#20336)
Revert "add `fromChar` (#20332)"

This reverts commit 846cc746a2350ad3f845a4eb0ce97b864891cd35.
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/strutils.nim9
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`.
   ##