Fix formatting of numbers into blocks

This commit is contained in:
Joscha 2019-11-19 16:03:36 +00:00
parent 75e102ed7d
commit ee7639c1c7

View file

@ -33,7 +33,7 @@ toHex :: (Integral a, Show a) => a -> T.Text
toHex a = T.pack $ showHex a ""
chunkedBy :: T.Text -> Int -> T.Text -> T.Text
chunkedBy sep n = T.intercalate sep . T.chunksOf n
chunkedBy sep n = T.reverse . T.intercalate sep . T.chunksOf n . T.reverse
chunkyBin :: T.Text -> T.Text
chunkyBin = chunkedBy " " 4