hxt-regex-xmlschema-9.2.0.3: A regular expression library for W3C XML Schema regular expressions

Copyright | Copyright (C) 2014- Uwe Schmidt
License | MIT
Maintainer | Uwe Schmidt <uwe@fh-wedel.de>
Stability | stable
Safe Haskell | Safe-Inferred
Language | Haskell2010

Text.Regex.XMLSchema.Generic.StringLike

Description

Synopsis

- class (Eq a, IsString a, Show a) => StringLike a where
  - emptyS :: a
  - uncons :: a -> Maybe (Char, a)
  - nullS :: a -> Bool
  - headS :: a -> Char
  - takeS :: Int -> a -> a
  - dropS :: Int -> a -> a
  - appendS :: a -> a -> a
  - concatS :: [a] -> a
  - toString :: a -> String

# Documentation

class (Eq a, IsString a, Show a) => StringLike a where #

WARNING: This StringLike class is not intended for use outside this regex library. It provides an abstraction for String's as used inside this library. It allows the library to work with String (list of Char), ByteString.Char8, ByteString.Lazy.Char8, Data.Text and Data.Text.Lazy.

The class is similar to the StringLike class in the tagsoup package

Minimal complete definition

emptyS, uncons, takeS, dropS, appendS, toString

Methods

emptyS :: a #

uncons :: a -> Maybe (Char, a) #

nullS :: a -> Bool #

headS :: a -> Char #

takeS :: Int -> a -> a #

dropS :: Int -> a -> a #

appendS :: a -> a -> a #

concatS :: [a] -> a #

toString :: a -> String #

#### Instances

Instances details

StringLike String # |
Instance details Defined in Text.Regex.XMLSchema.Generic.StringLike Methods emptyS :: String # uncons :: String -> Maybe (Char, String) # nullS :: String -> Bool # headS :: String -> Char # takeS :: Int -> String -> String # dropS :: Int -> String -> String # appendS :: String -> String -> String # concatS :: [String] -> String # toString :: String -> String #
StringLike ByteString # |
Instance details Defined in Text.Regex.XMLSchema.Generic.StringLike Methods emptyS :: ByteString # uncons :: ByteString -> Maybe (Char, ByteString) # nullS :: ByteString -> Bool # headS :: ByteString -> Char # takeS :: Int -> ByteString -> ByteString # dropS :: Int -> ByteString -> ByteString # appendS :: ByteString -> ByteString -> ByteString # concatS :: [ByteString] -> ByteString # toString :: ByteString -> String #
StringLike ByteString # |
Instance details Defined in Text.Regex.XMLSchema.Generic.StringLike Methods emptyS :: ByteString # uncons :: ByteString -> Maybe (Char, ByteString) # nullS :: ByteString -> Bool # headS :: ByteString -> Char # takeS :: Int -> ByteString -> ByteString # dropS :: Int -> ByteString -> ByteString # appendS :: ByteString -> ByteString -> ByteString # concatS :: [ByteString] -> ByteString # toString :: ByteString -> String #
StringLike Text # |
Instance details Defined in Text.Regex.XMLSchema.Generic.StringLike Methods emptyS :: Text # uncons :: Text -> Maybe (Char, Text) # nullS :: Text -> Bool # headS :: Text -> Char # takeS :: Int -> Text -> Text # dropS :: Int -> Text -> Text # appendS :: Text -> Text -> Text # concatS :: [Text] -> Text # toString :: Text -> String #
StringLike Text # |
Instance details Defined in Text.Regex.XMLSchema.Generic.StringLike Methods emptyS :: Text # uncons :: Text -> Maybe (Char, Text) # nullS :: Text -> Bool # headS :: Text -> Char # takeS :: Int -> Text -> Text # dropS :: Int -> Text -> Text # appendS :: Text -> Text -> Text # concatS :: [Text] -> Text # toString :: Text -> String #