From c9a92117f9b78e3227dfe2cdcc7cf5b113185832 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Tue, 13 Sep 2022 01:33:47 +0800 Subject: Revert "add `fromChar`" (#20336) Revert "add `fromChar` (#20332)" This reverts commit 846cc746a2350ad3f845a4eb0ce97b864891cd35. --- lib/pure/strutils.nim | 9 --------- 1 file changed, 9 deletions(-) (limited to 'lib/pure/strutils.nim') 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`. ## -- cgit 1.4.1-2-gfad0