diff options
author | tv <tv@krebsco.de> | 2022-04-05 21:39:55 +0200 |
---|---|---|
committer | tv <tv@krebsco.de> | 2022-04-05 22:06:40 +0200 |
commit | f4cdf79bd4a75e9eafe68b9a908f4cc68682b7ef (patch) | |
tree | d2cb50df2344d97042b2c006ee39811e2b87511d /src/Foreign/C/String/Extra.hs | |
parent | 032cb86ff8108eb4915a692015da344a41f78506 (diff) |
boom
Diffstat (limited to 'src/Foreign/C/String/Extra.hs')
-rw-r--r-- | src/Foreign/C/String/Extra.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Foreign/C/String/Extra.hs b/src/Foreign/C/String/Extra.hs new file mode 100644 index 0000000..a7b6dfe --- /dev/null +++ b/src/Foreign/C/String/Extra.hs @@ -0,0 +1,10 @@ +module Foreign.C.String.Extra where + +import Data.Word (Word8) +import Foreign.C.String (castCCharToChar) +import Foreign.C.Types (CChar) +import qualified Data.Char as Char + + +castCCharToWord8 :: CChar -> Word8 +castCCharToWord8 = fromIntegral . Char.ord . castCCharToChar |