Safe Haskell | None |
---|---|
Language | Haskell2010 |
Distribution.Utils.ShortText
Contents
- data ShortText
- toShortText :: String -> ShortText
- fromShortText :: ShortText -> String
- decodeStringUtf8 :: [Word8] -> String
- encodeStringUtf8 :: String -> [Word8]
ShortText
type
Compact representation of short Strings
The data is stored internally as UTF8 in an
ShortByteString
when compiled against bytestring >=
0.10.4
, and otherwise the fallback is to use plain old non-compat
'[Char]'.
Note: This type is for internal uses (such as e.g. PackageName
)
and shall not be exposed in Cabal's API
Since: 2.0.0
internal utilities
decodeStringUtf8 :: [Word8] -> String Source #
Decode String
from UTF8-encoded octets.
Invalid data will be decoded as the replacement character (U+FFFD
)
See also encodeStringUtf8