module CabalGild.Extra.String where

import qualified Data.ByteString as ByteString
import qualified Data.Text as Text
import qualified Data.Text.Encoding as Encoding

-- | Converts the given 'String' into a UTF-8 encoded 'ByteString.ByteString'.
toUtf8 :: String -> ByteString.ByteString
toUtf8 :: String -> ByteString
toUtf8 = Text -> ByteString
Encoding.encodeUtf8 (Text -> ByteString) -> (String -> Text) -> String -> ByteString
forall b c a. (b -> c) -> (a -> b) -> a -> c
. String -> Text
Text.pack