mirror of
https://code.sup39.dev/repos/Wqawg
synced 2025-03-20 04:46:22 +09:00
Remove some old code and adapt to hit-graph
This commit is contained in:
parent
135e8e7502
commit
b68428d9b6
7 changed files with 28 additions and 292 deletions
src/Data/ByteString
|
@ -36,5 +36,5 @@ import qualified Data.ByteString as B
|
|||
fromDecimal :: Num a => ByteString -> Maybe a
|
||||
fromDecimal s =
|
||||
if (not . B.null) s && B.all (\ b -> 48 <= b && b <= 57) s
|
||||
then Just $ B.foldl' (\ n b -> 10 * n + b - 48) 0 s
|
||||
then Just $ B.foldl' (\ n b -> 10 * n + fromIntegral b - 48) 0 s
|
||||
else Nothing
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue