text-conversions: Safe conversions between textual types

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Warnings:

Safe conversions between textual types


[Skip to Readme]

Properties

Versions 0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.3.1
Change log CHANGELOG.md
Dependencies base (>=4.7 && <5), base16-bytestring (<2), base64-bytestring (<2), bytestring (==0.*), errors (<3), text (<2) [details]
License ISC
Author Alexis King
Maintainer lexi.lambda@gmail.com
Category Data
Home page https://github.com/cjdev/text-conversions#readme
Bug tracker https://github.com/cjdev/text-conversions/issues
Source repo head: git clone https://github.com/cjdev/text-conversions
Uploaded by lexi_lambda at 2020-09-30T03:28:09Z

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for text-conversions-0.3.1

[back to package description]

text-conversions Build Status

This is a small library to ease the pain when converting between the many different string types in Haskell. Unlike some other libraries that attempt to solve the same problem, text-conversions is:

Here’s an example of using text-conversions to convert between textual types:

> convertText ("hello" :: String) :: Text
"hello"

And here’s an example of converting from UTF-8 encoded binary data to a textual format:

> decodeConvertText (UTF8 ("hello" :: ByteString)) :: Maybe Text
Just "hello"
> decodeConvertText (UTF8 ("\xc3\x28" :: ByteString)) :: Maybe Text
Nothing

For more details, see the documentation on Hackage.