elynx-tools-0.0.1: Tools for ELynx.

Copyright(c) Dominik Schrempf 2019
LicenseGPL-3
Maintainerdominik.schrempf@gmail.com
Stabilityunstable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

ELynx.Tools.ByteString

Contents

Description

Creation date: Thu Feb 14 13:24:53 2019.

indispensable tools for ByteString handling :).

Synopsis

ByteString handling.

alignRightWith :: Char -> Int -> ByteString -> ByteString Source #

For a given width, align string to the right; use given fill character; trim on the left if string is longer.

alignRight :: Int -> ByteString -> ByteString Source #

For a given width, align string to the right; trim on the left if string is longer.

alignLeftWith :: Char -> Int -> ByteString -> ByteString Source #

For a given width, align string to the left; use given fill character; trim on the right if string is longer.

alignLeft :: Int -> ByteString -> ByteString Source #

For a given width, align string to the left; trim on the right if string is longer.

summarizeByteString :: Int -> ByteString -> ByteString Source #

If a string is longer than a given value, trim it and add some dots.

c2w :: Char -> Word8 #

Unsafe conversion between Char and Word8. This is a no-op and silently truncates to 8 bits Chars > '\255'. It is provided as convenience for ByteString construction.

w2c :: Word8 -> Char #

Conversion between Word8 and Char. Should compile to a no-op.

bsShow :: Show a => a -> ByteString Source #

Conversion to ByteString.