title: What is the best way to convert String to ByteString
body: <p>What is the best way to convert a String to a ByteString in Haskell?</p>
  
  <p>My gut reaction to the problem is</p>
  
  <pre><code>import qualified Data.ByteString as B
  import Data.Char (ord)
  
  packStr = B.pack . map (fromIntegral . ord)
  </code></pre>
  
  <p>But this doesn't seem satisfactory.</p>