strings 1.0.0 → 1.0.2
raw patch · 2 files changed
+43/−17 lines, 2 filesdep ~bytestring
Dependency ranges changed: bytestring
Files
- src/Data/Strings.hs +19/−4
- strings.cabal +24/−13
src/Data/Strings.hs view
@@ -2,15 +2,23 @@ FlexibleInstances, Trustworthy #-} --- | Functions for working with strings, including 'Text', 'ByteString', etc.+-- |+-- Copyright: Julian Fleischer+-- License: MIT --+-- Maintainer: Julian Fleischer <julian.fleischer@fu-berlin.de>+-- Stability: provisional+-- Portability: portable+--+-- Functions for working with strings, including 'Text', 'ByteString', etc.+-- -- This module aims at offering a consistent interface across all the available -- string types. It currently offers instances for the ordinary Haskell 'String' -- type, 'Text', lazy 'LazyT.Text', 'ByteString', and lazy 'LazyB.ByteString'. ----- If especially provides functions for some types, which are otherwise not--- available nativly (such as 'breakOnSubstring' is not available for the lazy--- 'LazyT.Text' type, is offered by 'sBreak' and 'strBreak').+-- It especially provides functions for some types, which are otherwise not+-- available nativly (such as 'breakOnSubstring' which is not available for the+-- lazy 'LazyT.Text' type, is offered by 'sBreak' and 'strBreak'). module Data.Strings ( text,@@ -86,6 +94,9 @@ -- -- The complexity and efficiency of these functions depends on the underlying -- string type being used.+--+-- Minimal complete definition: It suffices to provide instances for+-- 'Eq' and 'Strings'. class (Eq a, Strings a) => Str a where -- | Check whether the given string is empty or not. 'null' generalised.@@ -399,6 +410,10 @@ padStrL = sFromString $ replicate padLenL c padStrR = sFromString $ replicate padLenR c in sConcat [padStrL, s, padStrR]++ sFromString = sFromUnicodeString++ sToWord8 = sToWord8 . sToString instance Strings ByteString where
strings.cabal view
@@ -1,18 +1,29 @@-Name: strings-Version: 1.0.0-Synopsis: Functions for working with strings, including Text, ByteString, etc.-Description: Functions for working with strings, including Text, ByteString, etc.-License: MIT-License-File: LICENSE-Author: Julian Fleischer-Maintainer: julian.fleischer@fu-berlin.de-Build-Type: Simple-Cabal-Version: >= 1.4-Category: Text, String, Utility-Stability: provisional+Name: strings+Version: 1.0.2+Synopsis: Functions for working with strings, including Text, ByteString, etc.+Description: Functions for working with strings, including Text, ByteString, etc. + +License: MIT+License-File: LICENSE+Author: Julian Fleischer <julian.fleischer@fu-berlin.de>+Maintainer: Julian Fleischer <julian.fleischer@fu-berlin.de>+Build-Type: Simple+Cabal-Version: >= 1.6+Category: Text, String, Utility+Stability: provisional+Homepage: http://hub.darcs.net/scravy/strings +Source-Repository head+ type: darcs+ location: hub.darcs.net:strings++Source-Repository head+ type: darcs+ location: hub.darcs.net:strings+ tag: v1.0.2+ Library Exposed-Modules: Data.Strings- Build-Depends: base >= 4 && < 5, bytestring >= 0.9 && < 0.10, text >= 0.10+ Build-Depends: base >= 4 && < 5, bytestring >= 0.9 && < 0.11, text >= 0.10 Hs-Source-Dirs: src