String class library
string-combinators provides handy polymorphic functions to build and combine string-like values.
All functions are polymorphic in their string-like type but usually have a Monoid or IsString constraint.
Provides a simple type class for converting values of different string types into values of other string types.
QuasiQuoter for non-interpolated strings, texts and bytestrings.
QuasiQuoter for non-interpolated strings, texts and bytestrings.
algorithms for finding the longest common substring in a set of documents
Data.Stringable provides a type class with a set of functions for converting to and from the most often used string-linke types in Haskell.
Transformations to several string-like types
This package provides various functions for working with strings, such as join, split, toUppercase, etc.
The functions in this package work with all kinds of strings such as Text, ByteString, String, and their respective lazy counter parts. There is also an interface which is agnostic of the underlying string type.
v1.0.2: Fixed an issue with strSplitAll. Applied to the empty string it should return an empty list, but it returned a list containing a single empty string. It now returns correctly the empty list. v1.1: Added strToUpper, strToLower, strCapitalize, strCons, and strMap. Also sCapitalize, sCons, and sMap.
This package provides several functions to quickly search for substrings in strict or lazy ByteStrings. It also provides functions for breaking or splitting on substrings and replacing all occurrences of a substring (the first in case of overlaps) with another. GHC before 6.10 are no longer supported, other compilers only if they support BangPatterns. If you need it to work with other compilers, send a feature request.
Memoize Strings as Atoms for fast comparison and sorting, with maps and sets
Fast base16 (hex) encoding and decoding for ByteStrings
Fast base64 encoding and decoding for ByteStrings
This Base64 implementation uses the characters A-Z a-z 0-9 + along with = to signal the number of characters mod 3. It is compliant with both PEM (RFC 989 RFC 1421) and MIME (RFC 2045).
Lazy bit strings, built on the top of bytestrings.
An efficient compact, immutable byte string type (both strict and lazy) suitable for binary or 8-bit character data.
The ByteString type represents sequences of bytes or 8-bit characters. It is suitable for high performance use, both in terms of large data quantities, or high speed requirements. The ByteString functions follow the same style as Haskell's ordinary lists, so it is easy to convert code from using String to ByteString.
Two ByteString variants are provided:
* Strict ByteStrings keep the string as a single large array. This makes them convenient for passing data between C and Haskell.
* Lazy ByteStrings use a lazy list of strict chunks which makes it suitable for I/O streaming tasks.
The Char8 modules provide a character-based view of the same underlying ByteString types. This makes it convenient to handle mixed binary and 8-bit character content (which is common in many file formats and network protocols).
The Builder module provides an efficient way to build up ByteStrings in an ad-hoc way by repeated concatenation. This is ideal for fast serialisation or pretty printing.
ByteStrings are not designed for Unicode. For Unicode strings you should use the Text type from the text package.
These modules are intended to be imported qualified, to avoid name clashes with Prelude functions, e.g.
> import qualified Data.ByteString as BS
In theory, this allows the design of more data-agnostic APIs.
Parse CSV formatted data efficiently
Compute a patch between two ByteStrings which can later be applied to the first to produce the second. This can be used to save bandwidth and disk space when many strings differing by a small number of bytes need to be transmitted or stored.
The underlying implementation is written in C, and can also be found at http://ccodearchive.net/info/bdelta.html.
Currently, a patch does not save any space when two strings differ by more than 1000 bytes. This arbitrary limit serves to keep applications from spiking in memory and CPU usage, as the algorithm uses quadratic space and time with respect to the length of the patch. A better algorithm may be introduced in a future version of bytestring-delta.
This library provides a wrapper to mmap(2), allowing files or devices to be lazily loaded into memory as strict or lazy ByteStrings, using the virtual memory subsystem to do on-demand loading.
Parse numeric literals from ByteStrings.
In some cases, it is useful to know how fast a ByteString is being consumed. Typically, this could be to report some measure of progress to a waiting user, but it could also be to perform some form of testing on input / consumption code.
Efficient conversion of values into readable byte strings.
An efficient finite map from (byte)strings to values.
The implementation is based on big-endian patricia trees, like Data.IntMap. We first trie on the elements of Data.ByteString and then trie on the big-endian bit representation of those elements. Patricia trees have efficient algorithms for union and other merging operations, but they're also quick for lookups and insertions.
If you are only interested in being able to associate strings to values, then you may prefer the hashmap package which is faster for those only needing a map-like structure. This package is intended for those who need the extra capabilities that a trie-like structure can offer (e.g., structure sharing to reduce memory costs for highly redundant keys, taking the submap of all keys with a given prefix, contextual mapping, extracting the minimum and maximum keys, etc.)
AttoParsec with a small patch so I can get on with my parser.
This is a library of parser combinators, originally written by Koen Claessen. It parses all alternatives in parallel, so it never keeps hold of the beginning of the input string, a common source of space leaks with other parsers. The '(+++)' choice combinator is genuinely commutative; it makes no difference which branch is "shorter".
Adapted to use Data.ByteString by Gracjan Polak. Designed as a drop-in replacement for Text.ParserCombinators.ReadP.
Fast, packed, strict strings with a list interface. Based on Data.ByteString. Multiple encodings are supported.
Fast, packed, strict strings with a list interface. Based on Data.ByteString. Multiple encodings are supported. This is the same package as compact-string-0.3.1 except for a small fix to work with the new Exception library. Once Twan updates that package, this package will be deprecated.
Difference strings: a data structure for O(1) append on strings. Note that a DString is just a newtype wrapper around a DList Char. The reason we need a new type instead of just a type synonym is that we can have an instance IsString DString without using language extensions (TypeSynonymInstances or FlexibleInstances) so we can write overloaded string literals of type DString.
Extends explicit-iomodes with ByteString operations
Happstack is a web application framework. HStringTemplate is a templating solution.
A port of the Java library by Terrence Parr.
Convenience functions and instances for HStringTemplate. I will deprecate this package if its contents are integrated into HStringTemplate.
QuasiQuoter for Perl6-style multi-line interpolated strings with "q", "qq" and "qc" support.
Show more results