#5      ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 non-portable (BangPatterns) Provisional1Daniel Fischer <daniel.is.fischer@googlemail.com> indicesOfAny: finds all occurrences of any of several non-empty strict I patterns in a lazy target string. If no non-empty patterns are given, C the result is an empty list. Otherwise the result list contains H the pairs of all indices where any of the (non-empty) patterns start K and the list of all patterns starting at that index, the patterns being C represented by their (zero-based) position in the pattern list. = Empty patterns are filtered out before processing begins. List of non-empty patterns String to search List of matches 56789:non-portable (BangPatterns) Provisional1Daniel Fischer <daniel.is.fischer@googlemail.com> indicesOfAny< finds all occurrences of any of several non-empty patterns B in a strict target string. If no non-empty patterns are given, C the result is an empty list. Otherwise the result list contains H the pairs of all indices where any of the (non-empty) patterns start K and the list of all patterns starting at that index, the patterns being C represented by their (zero-based) position in the pattern list. = Empty patterns are filtered out before processing begins. List of non-empty patterns String to search List of matches ;<=>?  Provisional1Daniel Fischer <daniel.is.fischer@googlemail.com>@ABCDEFG@ABCDEFG@ABCDEFG non-portable (BangPatterns) Provisional1Daniel Fischer <daniel.is.fischer@googlemail.com>HindicesL- finds all indices of (possibly overlapping) 4 occurrences of the pattern in the target string. Strict pattern Lazy target string Offsets of matches IindicesS- finds all indices of (possibly overlapping) 4 occurrences of the pattern in the target string. Strict pattern Strict target string Offsets of matches matchLL# finds the starting indices of all non-overlapping occurrences F of the pattern in the target string. It is a simple wrapper around  5Data.ByteString.Lazy.Search.KMP.nonOverlappingIndices strictifying  the pattern.  Lazy pattern Lazy target string Offsets of matches matchLS# finds the starting indices of all non-overlapping occurrences F of the pattern in the target string. It is a simple wrapper around  0Data.ByteString.Search.KMP.nonOverlappingIndices strictifying  the pattern.  Lazy pattern Strict target string Offsets of matches matchSS# finds the starting indices of all non-overlapping occurrences ; of the pattern in the target string. It is an alias for  0Data.ByteString.Search.KMP.nonOverlappingIndices. Strict pattern Strict target string Offsets of matches matchSL# finds the starting indices of all non-overlapping occurrences ; of the pattern in the target string. It is an alias for  5Data.ByteString.Lazy.Search.KMP.nonOverlappingIndices. Strict pattern Lazy target string Offsets of matches JHIHInon-portable (BangPatterns) Provisional1Daniel Fischer <daniel.is.fischer@googlemail.com>indices8 finds the starting indices of all possibly overlapping 4 occurrences of the pattern in the target string. * If the pattern is empty, the result is [0 .. K target]. Pattern to find String to search Offsets of matches nonOverlappingIndices# finds the starting indices of all D non-overlapping occurrences of the pattern in the target string. E It is more efficient than removing indices from the list produced  by . Pattern to find String to search Offsets of matches non-portable (BangPatterns) Provisional1Daniel Fischer <daniel.is.fischer@googlemail.com>non-portable (BangPatterns) Provisional1Daniel Fischer <daniel.is.fischer@googlemail.com>indices8 finds the starting indices of all possibly overlapping 4 occurrences of the pattern in the target string. * If the pattern is empty, the result is [0 .. K target]. Strict pattern to find Lazy string to search Offsets of matches nonOverlappingIndices# finds the starting indices of all D non-overlapping occurrences of the pattern in the target string. E It is more efficient than removing indices from the list produced  by . Strict pattern to find Lazy string to search Offsets of matches  strictify transforms a lazy L into a strict  M2, to make it a suitable pattern for the searching  functions.    portable Provisional1Daniel Fischer <daniel.is.fischer@googlemail.com> =Type class of meaningful substitutions for replace functions A on ByteStrings. Instances for strict and lazy ByteStrings are  provided here.  substitution0 transforms a value to a substitution function. prependCycle sub lazyBS& shall prepend infinitely many copies  of sub to lazyBS+ without entering an infinite loop in case  of an empty sub , so e.g.      "" "ab" == "ab" shall (quickly) evaluate to N.  For non-empty sub., the cycle shall be constructed efficiently.     non-portable (BangPatterns) Provisional1Daniel Fischer <daniel.is.fischer@googlemail.com> indices8 finds the starting indices of all possibly overlapping 4 occurrences of the pattern in the target string. * If the pattern is empty, the result is [0 .. K target]. Pattern to find String to search Offsets of matches nonOverlappingIndices# finds the starting indices of all D non-overlapping occurrences of the pattern in the target string. E It is more efficient than removing indices from the list produced  by . Pattern to find String to search Offsets of matches breakOn pattern target splits target at the first occurrence  of pattern3. If the pattern does not occur in the target, the E second component of the result is empty, otherwise it starts with  pattern9. If the pattern is empty, the first component is empty.   O P .  pattern = Q String to search for String to search in ,Head and tail of string broken at substring breakAfter pattern target splits target behind the first occurrence  of pattern:. An empty second component means that either the pattern I does not occur in the target or the first occurrence of pattern is at I the very end of target. To discriminate between those cases, use e.g.  R.   O P .  pattern = Q String to search for String to search in /Head and tail of string broken after substring replace pat sub text/ replaces all (non-overlapping) occurrences of  pat in text with sub. If occurrences of pat overlap, the first H occurrence that does not overlap with a replaced previous occurrence " is substituted. Occurrences of pat arising from a substitution ) will not be substituted. For example:     "ana" "olog" "banana" = "bologna"   "ana" "o" "bananana" = "bono"   "aab" "abaa" "aaab" = "abaaab" The result is a lazy L, . which is lazily produced, without copying. < Equality of pattern and substitution is not checked, but    S . T $  pat pat text == text Dholds. If the pattern is empty but not the substitution, the result  is equivalent to (were they Us) V sub. For non-empty pat and sub a strict M,    W . Data.List.intersperse sub .  pat =  pat sub 0and analogous relations hold for other types of sub. Substring to replace Replacement string String to modify  Lazy result split pattern target splits target at each (non-overlapping)  occurrence of pattern , removing pattern. If pattern is empty, + the result is an infinite list of empty Ms, if target  is empty but not pattern), the result is an empty list, otherwise ! the following relations hold:    S . Data.List.intersperse pat .  pat = Q,  K ( pattern target) ==  K ( pattern target) + 1, 4no fragment in the result contains an occurrence of pattern. Pattern to split on String to split Fragments of string splitKeepEnd pattern target splits target after each (non-overlapping)  occurrence of pattern. If pattern is empty, the result is an  infinite list of empty Ms, otherwise the following  relations hold:    S .  pattern = Q, >all fragments in the result except possibly the last end with  pattern3, no fragment contains more than one occurrence of pattern. Pattern to split on String to split Fragments of string splitKeepFront is like , except that target is split  before each occurrence of pattern and hence all fragments 7 with the possible exception of the first begin with pattern. A No fragment contains more than one non-overlapping occurrence  of pattern. Pattern to split on String to split Fragments of string Xnon-portable (BangPatterns) Provisional1Daniel Fischer <daniel.is.fischer@googlemail.com> indices8 finds the starting indices of all possibly overlapping 4 occurrences of the pattern in the target string. * If the pattern is empty, the result is [0 .. K target]. Strict pattern to find Lazy string to search Offsets of matches nonOverlappingIndices# finds the starting indices of all D non-overlapping occurrences of the pattern in the target string. E It is more efficient than removing indices from the list produced  by . Strict pattern to find Lazy string to search Offsets of matches breakOn pattern target splits target at the first occurrence  of pattern3. If the pattern does not occur in the target, the E second component of the result is empty, otherwise it starts with  pattern9. If the pattern is empty, the first component is empty. E For a non-empty pattern, the first component is generated lazily, F thus the first parts of it can be available before the pattern has * been found or determined to be absent.   O Y .  pattern = Q Strict pattern to search for Lazy string to search in ,Head and tail of string broken at substring breakAfter pattern target splits target behind the first occurrence  of pattern:. An empty second component means that either the pattern I does not occur in the target or the first occurrence of pattern is at L the very end of target. If you need to discriminate between those cases,  use breakFindAfter. : If the pattern is empty, the first component is empty. E For a non-empty pattern, the first component is generated lazily, F thus the first parts of it can be available before the pattern has * been found or determined to be absent.    O Y .  pattern = Q   Strict pattern to search for Lazy string to search in /Head and tail of string broken after substring breakFindAfter does the same as  but additionally indicates 1 whether the pattern is present in the target.   Z .  pat =  pat Strict pattern to search for Lazy string to search in /Head and tail of string broken after substring  and presence of pattern replace pat sub text/ replaces all (non-overlapping) occurrences of  pat in text with sub. If occurrences of pat overlap, the first H occurrence that does not overlap with a replaced previous occurrence " is substituted. Occurrences of pat arising from a substitution ) will not be substituted. For example:     "ana" "olog" "banana" = "bologna"   "ana" "o" "bananana" = "bono"   "aab" "abaa" "aaab" = "abaaab" The result is a lazy L, . which is lazily produced, without copying. < Equality of pattern and substitution is not checked, but     pat pat text == text 7holds (the internal structure is generally different). @ If the pattern is empty but not the substitution, the result  is equivalent to (were they Us)  cycle sub. For non-empty pat and sub a lazy L,    [ . Data.List.intersperse sub .  pat =  pat sub 0and analogous relations hold for other types of sub. Strict pattern to replace Replacement string Lazy string to modify  Lazy result split pattern target splits target at each (non-overlapping)  occurrence of pattern , removing pattern. If pattern is empty, + the result is an infinite list of empty Ls, if target  is empty but not pattern), the result is an empty list, otherwise ' the following relations hold (where patL is the lazy L  corresponding to pat):    [ . Data.List.intersperse patL .  pat = Q,  K ( pattern target) ==  K ( pattern target) + 1, 4no fragment in the result contains an occurrence of pattern. Strict pattern to split on Lazy string to split Fragments of string splitKeepEnd pattern target splits target after each (non-overlapping)  occurrence of pattern. If pattern is empty, the result is an  infinite list of empty Ls, otherwise the following  relations hold:    [ .  pattern = 'id,' >all fragments in the result except possibly the last end with  pattern3, no fragment contains more than one occurrence of pattern. Strict pattern to split on Lazy string to split Fragments of string splitKeepFront is like , except that target is split  before each occurrence of pattern and hence all fragments 7 with the possible exception of the first begin with pattern. A No fragment contains more than one non-overlapping occurrence  of pattern. Strict pattern to split on Lazy string to split Fragments of string \]^   non-portable (BangPatterns) Provisional1Daniel Fischer <daniel.is.fischer@googlemail.com>"matchLL8 finds the starting indices of all possibly overlapping 4 occurrences of the pattern in the target string.  It is a simple wrapper for #Data.ByteString.Lazy.Search.indices. * If the pattern is empty, the result is [0 .. K target].  Lazy pattern Lazy target string Offsets of matches matchLS8 finds the starting indices of all possibly overlapping 4 occurrences of the pattern in the target string.  It is a simple wrapper for Data.ByteString.Search.indices. * If the pattern is empty, the result is [0 .. K target].  Lazy pattern Strict target string Offsets of matches !matchSL8 finds the starting indices of all possibly overlapping 4 occurrences of the pattern in the target string.  It is an alias for #Data.ByteString.Lazy.Search.indices. * If the pattern is empty, the result is [0 .. K target]. Strict pattern Lazy target string Offsets of matches "matchSS8 finds the starting indices of all possibly overlapping 4 occurrences of the pattern in the target string.  It is an alias for Data.ByteString.Search.indices. * If the pattern is empty, the result is [0 .. K target]. Strict pattern Strict target string Offsets of matches _>matchNOL finds the indices of all non-overlapping occurrences - of the pattern in the lazy target string. Strict pattern Lazy target string Offsets of matches `>matchNOS finds the indices of all non-overlapping occurrences / of the pattern in the Strict target string. Strict pattern Strict target string Offsets of matches aPattern to replace Substitution string Target string  Lazy result bPattern to replace Substitution string Target string  Lazy result c(This function has the same semantics as d ! but is generally much faster. Pattern to break on String to break up &Prefix and remainder of broken string ef1The analogous function for a lazy target string. B The first component is generated lazily, so parts of it can be E available before the pattern is detected (or found to be absent). Pattern to break on String to break up &Prefix and remainder of broken string ghiPattern to split on String to split List of fragments jPattern to split on String to split List of fragments kPattern to split on String to split List of fragments lPattern to split on String to split List of fragments mPattern to split on String to split List of fragments nPattern to split on String to split List of fragments opqrstuvwxyz{|} !"_`abcefghijklmn !"_`abcefghijklmn non-portable (BangPatterns) Provisional1Daniel Fischer <daniel.is.fischer@googlemail.com> !" !" non-portable (BangPatterns) Provisional1Daniel Fischer <daniel.is.fischer@googlemail.com> #indices8 finds the starting indices of all possibly overlapping 4 occurrences of the pattern in the target string. * If the pattern is empty, the result is [0 .. K target]. Strict pattern to find Lazy string to search Offsets of matches $nonOverlappingIndices# finds the starting indices of all D non-overlapping occurrences of the pattern in the target string. E It is more efficient than removing indices from the list produced  by #. Strict pattern to find Lazy string to search Offsets of matches %breakOn pattern target splits target at the first occurrence  of pattern3. If the pattern does not occur in the target, the E second component of the result is empty, otherwise it starts with  pattern9. If the pattern is empty, the first component is empty. E For a non-empty pattern, the first component is generated lazily, F thus the first parts of it can be available before the pattern has * been found or determined to be absent.   O Y . % pattern = Q Strict pattern to search for Lazy string to search in ,Head and tail of string broken at substring &breakAfter pattern target splits target behind the first occurrence  of pattern:. An empty second component means that either the pattern I does not occur in the target or the first occurrence of pattern is at L the very end of target. If you need to discriminate between those cases,  use breakFindAfter. : If the pattern is empty, the first component is empty. E For a non-empty pattern, the first component is generated lazily, F thus the first parts of it can be available before the pattern has * been found or determined to be absent.   O Y . & pattern = Q Strict pattern to search for Lazy string to search in /Head and tail of string broken after substring 'breakFindAfter does the same as & but additionally indicates 1 whether the pattern is present in the target.   Z . ' pat = & pat Strict pattern to search for Lazy string to search in /Head and tail of string broken after substring  and presence of pattern (replace pat sub text/ replaces all (non-overlapping) occurrences of  pat in text with sub. If occurrences of pat overlap, the first H occurrence that does not overlap with a replaced previous occurrence " is substituted. Occurrences of pat arising from a substitution ) will not be substituted. For example:    ( "ana" "olog" "banana" = "bologna"  ( "ana" "o" "bananana" = "bono"  ( "aab" "abaa" "aaab" = "abaaab" The result is a lazy L, . which is lazily produced, without copying. < Equality of pattern and substitution is not checked, but    ( pat pat text == text 7holds (the internal structure is generally different). @ If the pattern is empty but not the substitution, the result  is equivalent to (were they Us)  cycle sub. For non-empty pat and sub a lazy L,    [ . Data.List.intersperse sub . ) pat = ( pat sub 0and analogous relations hold for other types of sub. Strict pattern to replace Replacement string Lazy string to modify  Lazy result )split pattern target splits target at each (non-overlapping)  occurrence of pattern , removing pattern. If pattern is empty, + the result is an infinite list of empty Ls, if target  is empty but not pattern), the result is an empty list, otherwise ' the following relations hold (where patL is the lazy L  corresponding to pat):    [ . Data.List.intersperse patL . ) pat = Q,  K () pattern target) ==  K ($ pattern target) + 1, 4no fragment in the result contains an occurrence of pattern. Strict pattern to split on Lazy string to split Fragments of string *splitKeepEnd pattern target splits target after each (non-overlapping)  occurrence of pattern. If pattern is empty, the result is an  infinite list of empty Ls, otherwise the following  relations hold:    [ . * pattern = Q, >all fragments in the result except possibly the last end with  pattern3, no fragment contains more than one occurrence of pattern. Strict pattern to split on Lazy string to split Fragments of string +splitKeepFront is like *, except that target is split  before each occurrence of pattern and hence all fragments 7 with the possible exception of the first begin with pattern. A No fragment contains more than one non-overlapping occurrence  of pattern. Strict pattern to split on Lazy string to split Fragments of string , strictify converts a lazy L to a strict M " to make it a suitable pattern. #$%&'()*+, #$%&'()*+, #$%&'()*+, non-portable (BangPatterns) Provisional1Daniel Fischer <daniel.is.fischer@googlemail.com>-indices8 finds the starting indices of all possibly overlapping 4 occurrences of the pattern in the target string. * If the pattern is empty, the result is [0 .. K target].  In general, ~ .  $ - pat target is a much more  efficient version of . Pattern to find String to search Offsets of matches .nonOverlappingIndices# finds the starting indices of all D non-overlapping occurrences of the pattern in the target string. E It is more efficient than removing indices from the list produced  by -. Pattern to find String to search Offsets of matches /breakOn pattern target splits target at the first occurrence  of pattern3. If the pattern does not occur in the target, the E second component of the result is empty, otherwise it starts with  pattern9. If the pattern is empty, the first component is empty.   O P . / pattern = Q String to search for String to search in ,Head and tail of string broken at substring 0breakAfter pattern target splits target behind the first occurrence  of pattern:. An empty second component means that either the pattern I does not occur in the target or the first occurrence of pattern is at I the very end of target. To discriminate between those cases, use e.g.  R.   O P . 0 pattern = Q String to search for String to search in /Head and tail of string broken after substring 1replace pat sub text/ replaces all (non-overlapping) occurrences of  pat in text with sub. If occurrences of pat overlap, the first H occurrence that does not overlap with a replaced previous occurrence " is substituted. Occurrences of pat arising from a substitution ) will not be substituted. For example:    1 "ana" "olog" "banana" = "bologna"  1 "ana" "o" "bananana" = "bono"  1 "aab" "abaa" "aaab" = "abaaab" The result is a lazy L, . which is lazily produced, without copying. < Equality of pattern and substitution is not checked, but    (S . T $ 1 pat pat text) == text Dholds. If the pattern is empty but not the substitution, the result  is equivalent to (were they Us)  cycle sub. For non-empty pat and sub a strict M,    W . Data.List.intersperse sub . 2 pat = 1 pat sub 0and analogous relations hold for other types of sub. Substring to replace Replacement string String to modify  Lazy result 2split pattern target splits target at each (non-overlapping)  occurrence of pattern , removing pattern. If pattern is empty, + the result is an infinite list of empty Ms, if target  is empty but not pattern), the result is an empty list, otherwise ! the following relations hold:    S . Data.List.intersperse pat . 2 pat = Q,  K (2 pattern target) ==  K (. pattern target) + 1, 4no fragment in the result contains an occurrence of pattern. Pattern to split on String to split Fragments of string 3splitKeepEnd pattern target splits target after each (non-overlapping)  occurrence of pattern. If pattern is empty, the result is an  infinite list of empty Ms, otherwise the following  relations hold:    S . 3 pattern = Q, >all fragments in the result except possibly the last end with  pattern3, no fragment contains more than one occurrence of pattern. Pattern to split on String to split Fragments of string 4splitKeepFront is like 3, except that target is split  before each occurrence of pattern and hence all fragments 7 with the possible exception of the first begin with pattern. A No fragment contains more than one non-overlapping occurrence  of pattern. Pattern to split on String to split Fragments of string -./01234-./01234-./01234                      !"#$%&!"#$' ( )  * + , - . / 0 12345675879:;2<=5>?2@A5>B5>C5DE2@F23G5DHI5D?2<J5DCKLMNOPQR5>STUVWXYZ[\]IK^_`abcdefghij2kl23m5>nostringsearch-0.3.3%Data.ByteString.Lazy.Search.KarpRabin Data.ByteString.Search.KarpRabin'Data.ByteString.Search.KnuthMorrisPrattData.ByteString.Search.KMPData.ByteString.Lazy.Search.KMP#Data.ByteString.Search.SubstitutionData.ByteString.Search.DFAData.ByteString.Lazy.Search.DFA!Data.ByteString.Search.BoyerMooreData.ByteString.Lazy.SearchData.ByteString.Search%Data.ByteString.Search.Internal.Utils0Data.ByteString.Search.Internal.KnuthMorrisPratt*Data.ByteString.Search.Internal.BoyerMoore indicesOfAnymatchLLmatchLSmatchSSmatchSLindicesnonOverlappingIndices strictify Substitution substitution prependCyclebreakOn breakAfterreplacesplit splitKeepEndsplitKeepFrontbreakFindAfterrehash1rehash2rehash3rehash4 lazyMatchercheckFut strictMatcher automaton kmpBordersldropltakelsplitreleasekeepindicesLindicesSmatcherbaseGHC.Listlengthbytestring-0.9.1.8Data.ByteString.Lazy.Internal ByteStringData.ByteString.Internalghc-primGHC.BoolTrue Data.TupleuncurryData.ByteStringappendGHC.Baseid isSuffixOfconcatData.ByteString.LazytoChunksStringcycle fromChunksstrictSearcherfst lazySearcher lazyBreakerrgomatchNOLmatchNOS replaceAllS replaceAllLbreakSubstringSbreakSubstring breakAfterSbreakSubstringL breakAfterLbreakFindAfterL splitKeepEndSsplitKeepFrontS splitDropS splitKeepEndLsplitKeepFrontL splitDropL strictBreak lazyBreakstrictSplitKeepFrontstrictSplitKeepEndstrictSplitDroplazySplitKeepFrontlazySplitKeepEnd lazySplitDrop strictRepllazyReploccurs suffShifts suffLengths GHC.Classesnotnull isInfixOf