Safe Haskell | None |
---|---|
Language | Haskell2010 |
Documentation
integral' :: (Radix b, Num n, Source s) => proxy b -> s -> Maybe (n, s) Source
convert bytestring into unsigned integral using radix
>>>
integral' (Proxy :: Proxy 10) "12345" :: Maybe (Int, S.ByteString)
Just (12345,"")>>>
integral' (Proxy :: Proxy 2) "10112" :: Maybe (Int, L.ByteString)
Just (11,"2")>>>
integral' (Proxy :: Proxy 36) "Z" :: Maybe (Double, S.ByteString)
Just (35.0,"")