h$—      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Gautier DI FOLCOBSD2,Gautier DI FOLCO UnstableGHCNone !#$'(/89:<=?Wnonempty-wrapper-textO(n)$ Convert a 'NonEmpty String' into a 1. Performs replacement on invalid scalar values.nonempty-wrapper-textO(n) Convert a  into a 'NonEmpty String'.nonempty-wrapper-textO(n)$ Adds a character to the front of a *. This function is more costly than its List counterpart because it requires copying a new array. Performs replacement on invalid scalar values.nonempty-wrapper-textO(n)" Adds a character to the end of a . This copies the entire array in the process. Performs replacement on invalid scalar values. nonempty-wrapper-textO(1)" Returns the first character of a . nonempty-wrapper-textO(1)+ Returns the first character and rest of a . nonempty-wrapper-textO(1)! Returns the last character of a . nonempty-wrapper-textO(1), Returns all characters after the head of a . nonempty-wrapper-textO(1)) Returns all but the last character of a .nonempty-wrapper-textO(1) Returns all but the last character and the last character of a .nonempty-wrapper-textO(n)' Returns the number of characters in a .nonempty-wrapper-text O(min(n,c))& Compare the count of characters in a  to a number.  t c =  ( t) c This function gives the same answer as comparing against the result of , but can short circuit if the count of characters is greater than the number, and hence be more efficient.nonempty-wrapper-textO(n)  f t is the  obtained by applying f to each element of t.Example:0let message = pack "I am not angry. Not at all."1T.map (\c -> if c == '.' then '!' else c) message"I am not angry! Not at all!".Performs replacement on invalid scalar values.nonempty-wrapper-textO(n) The  function takes a  and a list of s and concatenates the list after interspersing the first argument between each element of the list.Example::T.intercalate "NI!" ["We", "seek", "the", "Holy", "Grail"] "WeNI!seekNI!theNI!HolyNI!Grail"nonempty-wrapper-textO(n) The  function takes a character and places it between the characters of a .Example:T.intersperse '.' "SHIELD" "S.H.I.E.L.D".Performs replacement on invalid scalar values.nonempty-wrapper-textO(n)$ Reverse the characters of a string.Example:T.reverse "desrever" "reversed"nonempty-wrapper-textO(m+n)- Replace every non-overlapping occurrence of needle in haystack with  replacement.:This function behaves as though it was defined as follows: (replace needle replacement haystack =  replacement (D needle haystack) As this suggests, each occurrence is replaced exactly once. So if needle occurs in  replacement, that occurrence will not! itself be replaced recursively:replace "oo" "foo" "oo""foo"$In cases where several instances of needle/ overlap, only the first one will be replaced:replace "ofo" "bar" "ofofo""barfo"In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).nonempty-wrapper-textO(n)! Convert a string to folded case.This function is mainly useful for performing caseless (also known as case insensitive) string comparisons. A string x" is a caseless match for a string y if and only if: toCaseFold x == toCaseFold yThe result string may be longer than the input string, and may differ from applying  to the input string. For instance, the Armenian small ligature "" (men now, U+FB13) is case folded to the sequence " " (men, U+0574) followed by " " (now, U+0576), while the Greek "" (micro sign, U+00B5) is case folded to "" (small letter mu, U+03BC) instead of itself.nonempty-wrapper-textO(n)? Convert a string to lower case, using simple case conversion.The result string may be longer than the input string. For instance, "" (Latin capital letter I with dot above, U+0130) maps to the sequence "i" (Latin small letter i, U+0069) followed by " " (combining dot above, U+0307).nonempty-wrapper-textO(n)? Convert a string to upper case, using simple case conversion.The result string may be longer than the input string. For instance, the German "" (eszett, U+00DF) maps to the two-letter sequence "SS".nonempty-wrapper-textO(n)? Convert a string to title case, using simple case conversion.The first letter of the input is converted to title case, as is every subsequent letter that immediately follows a non-letter. Every letter that immediately follows another letter is converted to lower case.The result string may be longer than the input string. For example, the Latin small ligature  (U+FB02) is converted to the sequence Latin capital letter F (U+0046) followed by Latin small letter l (U+006C).Note: this function does not take language or culture specific rules into account. For instance, in English, different style guides disagree on whether the book name "The Hill of the Red Fox" is correctly title cased@but this function will capitalize every word.nonempty-wrapper-textO(n) Left-justify a string to the given length, using the specified fill character on the right. Performs replacement on invalid scalar values. Examples:justifyLeft 7 'x' "foo" "fooxxxx"justifyLeft 3 'x' "foobar""foobar"nonempty-wrapper-textO(n) Right-justify a string to the given length, using the specified fill character on the left. Performs replacement on invalid scalar values. Examples:justifyRight 7 'x' "bar" "xxxxbar"justifyRight 3 'x' "foobar""foobar"nonempty-wrapper-textO(n) Center a string to the given length, using the specified fill character on either side. Performs replacement on invalid scalar values. Examples:center 8 'x' "HS" "xxxHSxxx"nonempty-wrapper-textO(n) The 2 function transposes the rows and columns of its ) argument. Note that this function uses , , and the list version of transpose, and is thus not very efficient. Examples:transpose ["green","orange"]["go","rr","ea","en","ng","e"]transpose ["blue","red"]["br","le","ud","e"]nonempty-wrapper-textO(n) , applied to a binary operator, a starting value (typically the left-identity of the operator), and a , reduces the / using the binary operator, from left to right.nonempty-wrapper-textO(n) A strict version of . nonempty-wrapper-textO(n) A variant of % that has no starting value argument.!nonempty-wrapper-textO(n) A strict version of  ."nonempty-wrapper-textO(n) ", applied to a binary operator, a starting value (typically the right-identity of the operator), and a , reduces the / using the binary operator, from right to left.=If the binary operator is strict in its second argument, use foldr' instead." is lazy like / for lists: evaluation actually traverses the 3 from left to right, only as far as it needs to. @Searches from left to right with short-circuiting behavior can also be defined using " (e.g., &, ', G, elem).#nonempty-wrapper-textO(n) A variant of "% that has no starting value argument.$nonempty-wrapper-textO(n) Concatenate a list of s.%nonempty-wrapper-textO(n) Map a function over a  that results in a , and concatenate the results.&nonempty-wrapper-textO(n) & p t* determines whether any character in the  t satisfies the predicate p.'nonempty-wrapper-textO(n) ' p t+ determines whether all characters in the  t satisfy the predicate p.(nonempty-wrapper-textO(n) (" returns the maximum value from a .)nonempty-wrapper-textO(n) )" returns the minimum value from a .*nonempty-wrapper-textO(n) * is similar to , but returns a list of successive reduced values from the left. Performs replacement on invalid scalar values. scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...] Properties   (* f z xs) = z   (* f z xs) =  f z xs+nonempty-wrapper-textO(n) + is a variant of * that has no starting value argument. Performs replacement on invalid scalar values. .scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...],nonempty-wrapper-textO(n) , is the right-to-left dual of *2. Performs replacement on invalid scalar values. 1scanr f v == reverse . scanl (flip f) v . reverse-nonempty-wrapper-textO(n) - is a variant of , that has no starting value argument. Performs replacement on invalid scalar values..nonempty-wrapper-textO(n) Like a combination of  and +. Applies a function to each element of a , passing an accumulating parameter from left to right, and returns a final 2. Performs replacement on invalid scalar values./nonempty-wrapper-textThe /( function behaves like a combination of  and a strict ".; it applies a function to each element of a , passing an accumulating parameter from right to left, and returning a final value of this accumulator together with the new 1. Performs replacement on invalid scalar values.0nonempty-wrapper-textO(n*m) 0 n t is a  consisting of the input t repeated n times, n should be strictly positive.1nonempty-wrapper-textO(n) 1 n, applied to a , returns the prefix of the Text of length n , or the Text itself if n7 is greater than the length of the NonEmptyStrictText.2nonempty-wrapper-textO(n) 2 n t, returns the suffix remaining after taking n characters from the end of t. Examples:takeEnd 3 "foobar""bar"3nonempty-wrapper-textO(n) 3 n, applied to a , returns the suffix of the Text after the first n characters, or the empty Text if n$ is greater than the length of the .4nonempty-wrapper-textO(n) 4 n t. returns the prefix remaining after dropping n characters from the end of t. Examples:dropEnd 3 "foobar""foo"5nonempty-wrapper-textO(n) 5, applied to a predicate p and a , returns the longest prefix (possibly empty) of elements that satisfy p.6nonempty-wrapper-textO(n) 6, applied to a predicate p and a , returns the longest suffix (possibly empty) of elements that satisfy p . Examples:takeWhileEnd (=='o') "foo""oo"7nonempty-wrapper-textO(n) 7 p t% returns the suffix remaining after 5 p t.8nonempty-wrapper-textO(n) 8 p t returns the prefix remaining after dropping characters that satisfy the predicate p from the end of t. Examples:dropWhileEnd (=='.') "foo...""foo"9nonempty-wrapper-textO(n) 9 p t returns the substring remaining after dropping characters that satisfy the predicate p% from both the beginning and end of t.:nonempty-wrapper-textO(n): Remove leading white space from a string. Equivalent to: dropWhile isSpace;nonempty-wrapper-textO(n); Remove trailing white space from a string. Equivalent to: dropWhileEnd isSpace<nonempty-wrapper-textO(n) Remove leading and trailing white space from a string. Equivalent to: dropAround isSpace=nonempty-wrapper-textO(n) = n t4 returns a pair whose first element is a prefix of t of length n, and whose second is the remainder of the string. It is equivalent to (1 n t, 3 n t).>nonempty-wrapper-textO(n) >, applied to a predicate p and text t, returns a pair whose first element is the longest prefix (possibly empty) of t of elements that satisfy p1, and whose second is the remainder of the text.T.span (=='0') "000AB" ("000","AB")?nonempty-wrapper-textO(n) ? is like >, but the prefix returned is over elements that fail the predicate p.T.break (=='c') "180cm" ("180","cm")@nonempty-wrapper-textO(n)7 Group characters in a string according to a predicate.Anonempty-wrapper-textO(n)* Group characters in a string by equality.Bnonempty-wrapper-textO(n)* Return all initial segments of the given , shortest first.Cnonempty-wrapper-textO(n)( Return all final segments of the given , longest first.Dnonempty-wrapper-textO(m+n) Break a $ into pieces separated by the first Text argument (which cannot be empty), consuming the delimiter. An empty delimiter is invalid, and will cause an error to be raised. Examples:!splitOn "\r\n" "a\r\nb\r\nd\r\ne"["a","b","d","e"] splitOn "aaa" "aaaXaaaXaaaXaaa"["","X","X","X",""]splitOn "x" "x"["",""]and intercalate s . splitOn s == id splitOn (singleton c) == split (==c)(Note: the string s$ to split on above cannot be empty.)In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).Enonempty-wrapper-textO(n) Splits a  into components delimited by separators, where the predicate returns True for a separator element. The resulting components do not contain the separators. Two adjacent separators result in an empty component in the output. eg.split (=='a') "aabbaca"["","","bb","c",""]split (=='a') ""[""]Fnonempty-wrapper-textO(n) Splits a  into components of length k. The last element may be shorter than the other chunks, depending on the length of the input. Examples:chunksOf 3 "foobarbaz"["foo","bar","baz"]chunksOf 4 "haskell.org"["hask","ell.","org"]Gnonempty-wrapper-textO(n) The elem" function takes a character and a , and returns & if the element is found in the given , or  otherwise.O(n) The G" function takes a predicate and a <, and returns the first element matching the predicate, or  if there is no such element.Hnonempty-wrapper-textO(n) The H" function takes a predicate and a , and returns the pair of Texts with elements which do and do not satisfy the predicate, respectively; i.e. 1partition p t == (filter p t, filter (not . p) t)Inonempty-wrapper-textO(n) I, applied to a predicate and a  , returns a Text9 containing those characters that satisfy the predicate.Jnonempty-wrapper-textO(n+m) Find the first instance of needle (which must be non-null) in haystack=. The first element of the returned tuple is the prefix of haystack before needle. is matched. The second is the remainder of haystack, starting with the match. Examples:breakOn "::" "a::b::c"("a","::b::c")breakOn "/" "foobar" ("foobar","")Laws: append prefix match == haystack where (prefix, match) = breakOn needle haystackIf you need to break a string by a substring repeatedly (e.g. you want to break on every instance of a substring), use L, instead, as it has lower startup overhead.In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).Knonempty-wrapper-textO(n+m) Similar to J+, but searches from the end of the string.9The first element of the returned tuple is the prefix of haystack( up to and including the last match of needle#. The second is the remainder of haystack, following the match.breakOnEnd "::" "a::b::c"("a::b::","c")Lnonempty-wrapper-textO(n+m)' Find all non-overlapping instances of needle in haystack8. Each element of the returned list consists of a pair:The entire string prior to the kth match (i.e. the prefix)The k1th match, followed by the remainder of the string Examples:breakOnAll "::" ""[]breakOnAll "/" "a/b/c/"+[("a","/b/c/"),("a/b","/c/"),("a/b/c","/")]In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).The needle parameter may not be empty.Mnonempty-wrapper-textO(n) - index (subscript) operator, starting from 0.Nnonempty-wrapper-textO(n) The N" function takes a predicate and a 4 and returns the index of the first element in the  satisfying the predicate.Ononempty-wrapper-textO(n+m) The O function returns the number of times the query string appears in the given . An empty query string is invalid, and will cause an error to be raised.In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).Pnonempty-wrapper-textO(n) P takes two s and returns a list of corresponding pairs of bytes. If one input * is short, excess elements of the longer 1 are discarded. This is equivalent to a pair of  operations.Qnonempty-wrapper-textO(n) Q generalises P by zipping with the function given as the first argument, instead of a tupling function. Performs replacement on invalid scalar values.Rnonempty-wrapper-textO(n) Breaks a ' up into a list of words, delimited by s representing white space.Snonempty-wrapper-textO(n) Breaks a  up into a list of s at newline characters '\n' (LF, line feed). The resulting strings do not contain newlines.S does not treat '\r'. (CR, carriage return) as a newline character.Tnonempty-wrapper-textO(n)= Joins lines, after appending a terminating newline to each.Unonempty-wrapper-textO(n)+ Joins words using single space characters.Vnonempty-wrapper-textO(n) The V function takes two s and returns 4 if and only if the first is a prefix of the second.Wnonempty-wrapper-textO(n) The W function takes two s and returns 4 if and only if the first is a suffix of the second.Xnonempty-wrapper-textO(n+m) The X function takes two s and returns  if and only if the first is contained, wholly and intact, anywhere within the second.In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).Ynonempty-wrapper-textO(n) Return the suffix of the second string if its prefix matches the entire first string. Examples:stripPrefix "foo" "foobar" Just "bar"stripPrefix "" "baz" Just "baz"stripPrefix "foo" "quux"Nothing%This is particularly useful with the  ViewPatterns extension to GHC, as follows: {-# LANGUAGE ViewPatterns #-} import Data.Text.NonEmpty as T fnordLength :: NonEmptyStrictText -> Int fnordLength (stripPrefix "fnord" -> Just suf) = T.length suf fnordLength _ = -1Znonempty-wrapper-textO(n) Find the longest non-empty common prefix of two strings and return it, along with the suffixes of each string at which they no longer match.If the strings do not have a common prefix or either one is empty, this function returns . Examples:!commonPrefixes "foobar" "fooquux"Just ("foo","bar","quux") commonPrefixes "veeble" "fetzer"NothingcommonPrefixes "" "baz"Nothing[nonempty-wrapper-textO(n) Return the prefix of the second string if its suffix matches the entire first string. Examples:stripSuffix "bar" "foobar" Just "foo"stripSuffix "" "baz" Just "baz"stripSuffix "foo" "quux"Nothing%This is particularly useful with the  ViewPatterns extension to GHC, as follows: {-# LANGUAGE ViewPatterns #-} import Data.Text.NonEmpty as T quuxLength :: NonEmptyStrictText -> Int quuxLength (stripSuffix "quux" -> Just pre) = T.length pre quuxLength _ = -1nonempty-wrapper-textneedle? to search for. If this string is empty, an error will occur.nonempty-wrapper-text replacement to replace needle with.nonempty-wrapper-texthaystack in which to search.Dnonempty-wrapper-textString to split on. If this string is empty, an error will occur.nonempty-wrapper-text Input text.Lnonempty-wrapper-textneedle to search fornonempty-wrapper-texthaystack in which to search  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[   !"#$%&'()*+,-./0123456789<:;=JK?>A@BCDEFSRTUVWXY[ZILGHMNOPQ5Gautier DI FOLCOBSD2,Gautier DI FOLCO UnstableGHCNone !#$'(/89:<=?`nonempty-wrapper-textO(n)$ Convert a 'NonEmpty String' into a _1. Performs replacement on invalid scalar values.anonempty-wrapper-textO(n) Convert a  into a 'NonEmpty String'.bnonempty-wrapper-textO(c) Convert a list of strict s into a lazy _.cnonempty-wrapper-textO(n) Convert a lazy _ into a list of strict s.dnonempty-wrapper-textO(n) Convert a lazy _ into a strict .enonempty-wrapper-textO(c) Convert a strict  into a lazy _.fnonempty-wrapper-textO(n)$ Adds a character to the front of a _*. This function is more costly than its List counterpart because it requires copying a new array. Performs replacement on invalid scalar values.gnonempty-wrapper-textO(n)" Adds a character to the end of a _. This copies the entire array in the process. Performs replacement on invalid scalar values.hnonempty-wrapper-textO(1)" Returns the first character of a _.inonempty-wrapper-textO(1)+ Returns the first character and rest of a _.jnonempty-wrapper-textO(1)! Returns the last character of a _.knonempty-wrapper-textO(1), Returns all characters after the head of a _.lnonempty-wrapper-textO(1)) Returns all but the last character of a _.mnonempty-wrapper-textO(1) Returns all but the last character and the last character of a _.nnonempty-wrapper-textO(n)' Returns the number of characters in a _.ononempty-wrapper-text O(min(n,c))& Compare the count of characters in a _ to a number. o t c =  (n t) c This function gives the same answer as comparing against the result of n, but can short circuit if the count of characters is greater than the number, and hence be more efficient.pnonempty-wrapper-textO(n) p f t is the _ obtained by applying f to each element of t.Example:0let message = pack "I am not angry. Not at all."1T.map (\c -> if c == '.' then '!' else c) message"I am not angry! Not at all!".Performs replacement on invalid scalar values.qnonempty-wrapper-textO(n) The q function takes a _ and a list of _s and concatenates the list after interspersing the first argument between each element of the list.Example::T.intercalate "NI!" ["We", "seek", "the", "Holy", "Grail"] "WeNI!seekNI!theNI!HolyNI!Grail"rnonempty-wrapper-textO(n) The r function takes a character and places it between the characters of a _.Example:T.intersperse '.' "SHIELD" "S.H.I.E.L.D".Performs replacement on invalid scalar values.snonempty-wrapper-textO(n)$ Reverse the characters of a string.Example:T.reverse "desrever" "reversed"tnonempty-wrapper-textO(m+n)- Replace every non-overlapping occurrence of needle in haystack with  replacement.:This function behaves as though it was defined as follows: (replace needle replacement haystack = q replacement ( needle haystack) As this suggests, each occurrence is replaced exactly once. So if needle occurs in  replacement, that occurrence will not! itself be replaced recursively:replace "oo" "foo" "oo""foo"$In cases where several instances of needle/ overlap, only the first one will be replaced:replace "ofo" "bar" "ofofo""barfo"In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).unonempty-wrapper-textO(n)! Convert a string to folded case.This function is mainly useful for performing caseless (also known as case insensitive) string comparisons. A string x" is a caseless match for a string y if and only if: toCaseFold x == toCaseFold yThe result string may be longer than the input string, and may differ from applying v to the input string. For instance, the Armenian small ligature "" (men now, U+FB13) is case folded to the sequence " " (men, U+0574) followed by " " (now, U+0576), while the Greek "" (micro sign, U+00B5) is case folded to "" (small letter mu, U+03BC) instead of itself.vnonempty-wrapper-textO(n)? Convert a string to lower case, using simple case conversion.The result string may be longer than the input string. For instance, "" (Latin capital letter I with dot above, U+0130) maps to the sequence "i" (Latin small letter i, U+0069) followed by " " (combining dot above, U+0307).wnonempty-wrapper-textO(n)? Convert a string to upper case, using simple case conversion.The result string may be longer than the input string. For instance, the German "" (eszett, U+00DF) maps to the two-letter sequence "SS".xnonempty-wrapper-textO(n)? Convert a string to title case, using simple case conversion.The first letter of the input is converted to title case, as is every subsequent letter that immediately follows a non-letter. Every letter that immediately follows another letter is converted to lower case.The result string may be longer than the input string. For example, the Latin small ligature  (U+FB02) is converted to the sequence Latin capital letter F (U+0046) followed by Latin small letter l (U+006C).Note: this function does not take language or culture specific rules into account. For instance, in English, different style guides disagree on whether the book name "The Hill of the Red Fox" is correctly title cased@but this function will capitalize every word.ynonempty-wrapper-textO(n) Left-justify a string to the given length, using the specified fill character on the right. Performs replacement on invalid scalar values. Examples:justifyLeft 7 'x' "foo" "fooxxxx"justifyLeft 3 'x' "foobar""foobar"znonempty-wrapper-textO(n) Right-justify a string to the given length, using the specified fill character on the left. Performs replacement on invalid scalar values. Examples:justifyRight 7 'x' "bar" "xxxxbar"justifyRight 3 'x' "foobar""foobar"{nonempty-wrapper-textO(n) Center a string to the given length, using the specified fill character on either side. Performs replacement on invalid scalar values. Examples:center 8 'x' "HS" "xxxHSxxx"|nonempty-wrapper-textO(n) The |2 function transposes the rows and columns of its _) argument. Note that this function uses `, a, and the list version of transpose, and is thus not very efficient. Examples:transpose ["green","orange"]["go","rr","ea","en","ng","e"]transpose ["blue","red"]["br","le","ud","e"]}nonempty-wrapper-textO(n) }, applied to a binary operator, a starting value (typically the left-identity of the operator), and a _, reduces the _/ using the binary operator, from left to right.~nonempty-wrapper-textO(n) A strict version of }.nonempty-wrapper-textO(n) A variant of }% that has no starting value argument.nonempty-wrapper-textO(n) A strict version of .nonempty-wrapper-textO(n) , applied to a binary operator, a starting value (typically the right-identity of the operator), and a _, reduces the _/ using the binary operator, from right to left.=If the binary operator is strict in its second argument, use foldr' instead. is lazy like / for lists: evaluation actually traverses the _3 from left to right, only as far as it needs to. @Searches from left to right with short-circuiting behavior can also be defined using  (e.g., , , , elem).nonempty-wrapper-textO(n) A variant of % that has no starting value argument.nonempty-wrapper-textO(n) Concatenate a list of _s.nonempty-wrapper-textO(n) Map a function over a _ that results in a _, and concatenate the results.nonempty-wrapper-textO(n)  p t* determines whether any character in the _ t satisfies the predicate p.nonempty-wrapper-textO(n)  p t+ determines whether all characters in the _ t satisfy the predicate p.nonempty-wrapper-textO(n) " returns the maximum value from a _.nonempty-wrapper-textO(n) " returns the minimum value from a _.nonempty-wrapper-textO(n)  is similar to }, but returns a list of successive reduced values from the left. Performs replacement on invalid scalar values. scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...] Properties h ( f z xs) = z j ( f z xs) = } f z xsnonempty-wrapper-textO(n)  is a variant of  that has no starting value argument. Performs replacement on invalid scalar values. .scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]nonempty-wrapper-textO(n)  is the right-to-left dual of 2. Performs replacement on invalid scalar values. 1scanr f v == reverse . scanl (flip f) v . reversenonempty-wrapper-textO(n)  is a variant of  that has no starting value argument. Performs replacement on invalid scalar values.nonempty-wrapper-textO(n) Like a combination of p and ~+. Applies a function to each element of a _, passing an accumulating parameter from left to right, and returns a final _2. Performs replacement on invalid scalar values.nonempty-wrapper-textThe ( function behaves like a combination of p and a strict .; it applies a function to each element of a _, passing an accumulating parameter from right to left, and returning a final value of this accumulator together with the new _1. Performs replacement on invalid scalar values.nonempty-wrapper-textO(n*m)  n t is a _ consisting of the input t repeated n times, n should be strictly positive.nonempty-wrapper-text ties a finite, _ into a circular one, or equivalently, the infinite repetition of the original _.nonempty-wrapper-text f x returns an infinite _ of repeated applications of f to x: %iterate f x == [x, f x, f (f x), ...]nonempty-wrapper-textO(n)  n, applied to a _, returns the prefix of the Text of length n , or the Text itself if n5 is greater than the length of the NonEmptyLazyText.nonempty-wrapper-textO(n)  n t, returns the suffix remaining after taking n characters from the end of t. Examples:takeEnd 3 "foobar""bar"nonempty-wrapper-textO(n)  n, applied to a _, returns the suffix of the Text after the first n characters, or the empty Text if n$ is greater than the length of the _.nonempty-wrapper-textO(n)  n t. returns the prefix remaining after dropping n characters from the end of t. Examples:dropEnd 3 "foobar""foo"nonempty-wrapper-textO(n) , applied to a predicate p and a _, returns the longest prefix (possibly empty) of elements that satisfy p.nonempty-wrapper-textO(n) , applied to a predicate p and a _, returns the longest suffix (possibly empty) of elements that satisfy p . Examples:takeWhileEnd (=='o') "foo""oo"nonempty-wrapper-textO(n)  p t% returns the suffix remaining after  p t.nonempty-wrapper-textO(n)  p t returns the prefix remaining after dropping characters that satisfy the predicate p from the end of t. Examples:dropWhileEnd (=='.') "foo...""foo"nonempty-wrapper-textO(n)  p t returns the substring remaining after dropping characters that satisfy the predicate p% from both the beginning and end of t.nonempty-wrapper-textO(n): Remove leading white space from a string. Equivalent to: dropWhile isSpacenonempty-wrapper-textO(n); Remove trailing white space from a string. Equivalent to: dropWhileEnd isSpacenonempty-wrapper-textO(n) Remove leading and trailing white space from a string. Equivalent to: dropAround isSpacenonempty-wrapper-textO(n)  n t4 returns a pair whose first element is a prefix of t of length n, and whose second is the remainder of the string. It is equivalent to ( n t,  n t).nonempty-wrapper-textO(n) , applied to a predicate p and text t, returns a pair whose first element is the longest prefix (possibly empty) of t of elements that satisfy p1, and whose second is the remainder of the text.T.span (=='0') "000AB" ("000","AB")nonempty-wrapper-textO(n)  is like , but the prefix returned is over elements that fail the predicate p.T.break (=='c') "180cm" ("180","cm")nonempty-wrapper-textO(n)7 Group characters in a string according to a predicate.nonempty-wrapper-textO(n)* Group characters in a string by equality.nonempty-wrapper-textO(n)* Return all initial segments of the given _, shortest first.nonempty-wrapper-textO(n)( Return all final segments of the given _, longest first.nonempty-wrapper-textO(m+n) Break a _$ into pieces separated by the first Text argument (which cannot be empty), consuming the delimiter. An empty delimiter is invalid, and will cause an error to be raised. Examples:!splitOn "\r\n" "a\r\nb\r\nd\r\ne"["a","b","d","e"] splitOn "aaa" "aaaXaaaXaaaXaaa"["","X","X","X",""]splitOn "x" "x"["",""]and intercalate s . splitOn s == id splitOn (singleton c) == split (==c)(Note: the string s$ to split on above cannot be empty.)In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).nonempty-wrapper-textO(n) Splits a _ into components delimited by separators, where the predicate returns True for a separator element. The resulting components do not contain the separators. Two adjacent separators result in an empty component in the output. eg.split (=='a') "aabbaca"["","","bb","c",""]split (=='a') ""[""]nonempty-wrapper-textO(n) Splits a _ into components of length k. The last element may be shorter than the other chunks, depending on the length of the input. Examples:chunksOf 3 "foobarbaz"["foo","bar","baz"]chunksOf 4 "haskell.org"["hask","ell.","org"]nonempty-wrapper-textO(n) The elem" function takes a character and a _, and returns & if the element is found in the given _, or  otherwise.O(n) The " function takes a predicate and a _<, and returns the first element matching the predicate, or  if there is no such element.nonempty-wrapper-textO(n) The " function takes a predicate and a _, and returns the pair of Texts with elements which do and do not satisfy the predicate, respectively; i.e. 1partition p t == (filter p t, filter (not . p) t)nonempty-wrapper-textO(n) , applied to a predicate and a _ , returns a Text9 containing those characters that satisfy the predicate.nonempty-wrapper-textO(n+m) Find the first instance of needle (which must be non-null) in haystack=. The first element of the returned tuple is the prefix of haystack before needle. is matched. The second is the remainder of haystack, starting with the match. Examples:breakOn "::" "a::b::c"("a","::b::c")breakOn "/" "foobar" ("foobar","")Laws: append prefix match == haystack where (prefix, match) = breakOn needle haystackIf you need to break a string by a substring repeatedly (e.g. you want to break on every instance of a substring), use , instead, as it has lower startup overhead.In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).nonempty-wrapper-textO(n+m) Similar to +, but searches from the end of the string.9The first element of the returned tuple is the prefix of haystack( up to and including the last match of needle#. The second is the remainder of haystack, following the match.breakOnEnd "::" "a::b::c"("a::b::","c")nonempty-wrapper-textO(n+m)' Find all non-overlapping instances of needle in haystack8. Each element of the returned list consists of a pair:The entire string prior to the kth match (i.e. the prefix)The k1th match, followed by the remainder of the string Examples:breakOnAll "::" ""[]breakOnAll "/" "a/b/c/"+[("a","/b/c/"),("a/b","/c/"),("a/b/c","/")]In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).The needle parameter may not be empty.nonempty-wrapper-textO(n) _- index (subscript) operator, starting from 0.nonempty-wrapper-textO(n+m) The  function returns the number of times the query string appears in the given _. An empty query string is invalid, and will cause an error to be raised.In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).nonempty-wrapper-textO(n)  takes two _s and returns a list of corresponding pairs of bytes. If one input _* is short, excess elements of the longer _1 are discarded. This is equivalent to a pair of a operations.nonempty-wrapper-textO(n)  generalises  by zipping with the function given as the first argument, instead of a tupling function. Performs replacement on invalid scalar values.nonempty-wrapper-textO(n) Breaks a _' up into a list of words, delimited by s representing white space.nonempty-wrapper-textO(n) Breaks a _ up into a list of _s at newline characters '\n' (LF, line feed). The resulting strings do not contain newlines. does not treat '\r'. (CR, carriage return) as a newline character.nonempty-wrapper-textO(n)= Joins lines, after appending a terminating newline to each.nonempty-wrapper-textO(n)+ Joins words using single space characters.nonempty-wrapper-textO(n) The  function takes two _s and returns 4 if and only if the first is a prefix of the second.nonempty-wrapper-textO(n) The  function takes two _s and returns 4 if and only if the first is a suffix of the second.nonempty-wrapper-textO(n+m) The  function takes two _s and returns  if and only if the first is contained, wholly and intact, anywhere within the second.In (unlikely) bad cases, this function's time complexity degrades towards O(n*m).nonempty-wrapper-textO(n) Return the suffix of the second string if its prefix matches the entire first string. Examples:stripPrefix "foo" "foobar" Just "bar"stripPrefix "" "baz" Just "baz"stripPrefix "foo" "quux"Nothing%This is particularly useful with the  ViewPatterns extension to GHC, as follows: {-# LANGUAGE ViewPatterns #-} import Data.Text.NonEmpty as T fnordLength :: NonEmptyLazyText -> Int fnordLength (stripPrefix "fnord" -> Just suf) = T.length suf fnordLength _ = -1nonempty-wrapper-textO(n) Find the longest non-empty common prefix of two strings and return it, along with the suffixes of each string at which they no longer match.If the strings do not have a common prefix or either one is empty, this function returns . Examples:!commonPrefixes "foobar" "fooquux"Just ("foo","bar","quux") commonPrefixes "veeble" "fetzer"NothingcommonPrefixes "" "baz"Nothingnonempty-wrapper-textO(n) Return the prefix of the second string if its suffix matches the entire first string. Examples:stripSuffix "bar" "foobar" Just "foo"stripSuffix "" "baz" Just "baz"stripSuffix "foo" "quux"Nothing%This is particularly useful with the  ViewPatterns extension to GHC, as follows: {-# LANGUAGE ViewPatterns #-} import Data.Text.NonEmpty as T quuxLength :: NonEmptyLazyText -> Int quuxLength (stripSuffix "quux" -> Just pre) = T.length pre quuxLength _ = -1tnonempty-wrapper-textneedle? to search for. If this string is empty, an error will occur.nonempty-wrapper-text replacement to replace needle with.nonempty-wrapper-texthaystack in which to search.nonempty-wrapper-textString to split on. If this string is empty, an error will occur.nonempty-wrapper-text Input text.nonempty-wrapper-textneedle to search fornonempty-wrapper-texthaystack in which to search^_`abcdefghijklmnopqrstuvwxyz{|}~^_`abcdefgimhjklnopqr|stuvwxyz{}~f5Gautier DI FOLCOBSD2,Gautier DI FOLCO UnstableGHCNone !#$'(/89:<=?Tnonempty-wrapper-text Decode a 2 containing Latin-1 (aka ISO-8859-1) encoded text.! is semantically equivalent to -Data.Text.pack . Data.ByteString.Char8.unpackThis is a total function. However, bear in mind that decoding Latin-1 (non-ASCII) characters to UTf-8 requires actual work and is not just buffer copying.nonempty-wrapper-text Decode a  containing UTF-8 encoded text.;Surrogate code points in replacement character returned by 9 will be automatically remapped to the replacement char U+FFFD.nonempty-wrapper-text$Decode, in a stream oriented way, a : containing UTF-8 encoded text that is known to be valid.If the input contains any invalid UTF-8 data, an exception will be thrown (either by this function or a continuation) that cannot be caught in pure code. For more control over the handling of invalid data, use .nonempty-wrapper-text)Decode, in a stream oriented way, a lazy  containing UTF-8 encoded text.nonempty-wrapper-text Decode a : containing UTF-8 encoded text that is known to be valid.If the input contains any invalid UTF-8 data, an exception will be thrown that cannot be caught in pure code. For more control over the handling of invalid data, use  or .This is a partial function: it checks that input is a well-formed UTF-8 sequence and copies buffer or throws an error otherwise.nonempty-wrapper-text Decode a  containing UTF-8 encoded text.If the input contains any invalid UTF-8 data, the relevant exception will be returned, otherwise the decoded text.nonempty-wrapper-textEncode text to a ByteString  using UTF-8 encoding.nonempty-wrapper-textEncode text using UTF-8 encoding and escape the ASCII characters using a .Use this function is to implement efficient encoders for text-based formats like JSON or HTML.nonempty-wrapper-text!Encode text using UTF-8 encoding.nonempty-wrapper-text/Decode text from little endian UTF-16 encoding.nonempty-wrapper-text/Decode text from little endian UTF-16 encoding.If the input contains any invalid little endian UTF-16 data, an exception will be thrown. For more control over the handling of invalid data, use .nonempty-wrapper-text,Decode text from big endian UTF-16 encoding.nonempty-wrapper-text,Decode text from big endian UTF-16 encoding.If the input contains any invalid big endian UTF-16 data, an exception will be thrown. For more control over the handling of invalid data, use .nonempty-wrapper-text0Encode text using little endian UTF-16 encoding.nonempty-wrapper-text-Encode text using big endian UTF-16 encoding.nonempty-wrapper-text/Decode text from little endian UTF-32 encoding.nonempty-wrapper-text/Decode text from little endian UTF-32 encoding.If the input contains any invalid little endian UTF-32 data, an exception will be thrown. For more control over the handling of invalid data, use .nonempty-wrapper-text,Decode text from big endian UTF-32 encoding.nonempty-wrapper-text,Decode text from big endian UTF-32 encoding.If the input contains any invalid big endian UTF-32 data, an exception will be thrown. For more control over the handling of invalid data, use .nonempty-wrapper-text0Encode text using little endian UTF-32 encoding.nonempty-wrapper-text-Encode text using big endian UTF-32 encoding.None !#$'(/89:<=?   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmn !"#$%&'()*+,-./0123456789:;<op=>?@ABCDEFGHIJKLMNOPQRSTUVWXY[\]^_`abcdefghiqrstuvwxyz{|}~ 4nonempty-wrapper-text-0.1.0.0-2IR6eEhYpTmLhmzShlXz2BData.Text.NonEmptyData.Text.Encoding.NonEmptyData.Text.Lazy.NonEmptyPcompare Data.ListfoldrPaths_nonempty_wrapper_text/nonempty-wrapper-0.1.0.0-JdlAuGEIYeqD6rVUyw4Qcu Data.NonEmpty singleton text-1.2.3.2Data.Text.EncodingSomeDecoding NonEmptyTextNonEmptyStrictTextpackunpackconssnocheadunconslasttailinitunsnoclength compareLengthmap intercalate interspersereversereplace toCaseFoldtoLowertoUppertoTitle justifyLeft justifyRightcenter transposefoldlfoldl'foldl1foldl1'foldr1concat concatMapanyallmaximumminimumscanlscanl1scanrscanr1 mapAccumL mapAccumR replicatetaketakeEnddropdropEnd takeWhile takeWhileEnd dropWhile dropWhileEnd dropAround stripStartstripEndstripsplitAtspanbreakgroupBygroupinitstailssplitOnsplitchunksOffind partitionfilterbreakOn breakOnEnd breakOnAllindex findIndexcountzipzipWithwordslinesunlinesunwords isPrefixOf isSuffixOf isInfixOf stripPrefixcommonPrefixes stripSuffix$fNonEmptyFromContainerText$fNonEmptySingletonTextNonEmptyLazyText fromChunkstoChunkstoStrict fromStrictcycleiterate decodeLatin1decodeUtf8WithstreamDecodeUtf8streamDecodeUtf8With decodeUtf8 decodeUtf8'encodeUtf8BuilderencodeUtf8BuilderEscaped encodeUtf8decodeUtf16LEWith decodeUtf16LEdecodeUtf16BEWith decodeUtf16BE encodeUtf16LE encodeUtf16BEdecodeUtf32LEWith decodeUtf32LEdecodeUtf32BEWith decodeUtf32BE encodeUtf32LE encodeUtf32BEghc-prim GHC.TypesTrueFalsebase GHC.MaybeNothingCharbytestring-0.10.10.0Data.ByteString.Internal ByteStringData.Text.Encoding.Error OnDecodeError Data.ByteString.Builder.InternalBuilder%Data.ByteString.Builder.Prim.Internal BoundedPrimversion getBinDir getLibDir getDynLibDir getDataDir getLibexecDir getSysconfDirgetDataFileName