Commits

Anonymous committed 2e0318d

Documentation fix for breakOnAll.

Replaced occurences of 'find' in the 'breakOnAll' examples. Also
replaced 'find' with 'breakOnAll' in the Indexing discussion. Replaced
'find' with 'breakOnAll' in 'breakOn' discussion in Data.Text.Lazy.

Comments (0)

Files changed (2)

 --
 -- Examples:
 --
--- > find "::" ""
+-- > breakOnAll "::" ""
 -- > ==> []
--- > find "/" "a/b/c/"
+-- > breakOnAll "/" "a/b/c/"
 -- > ==> [("a", "/b/c/"), ("a/b", "/c/"), ("a/b/c", "/")]
 --
 -- In (unlikely) bad cases, this function's time complexity degrades
 -- For example, suppose you have a string that you want to split on
 -- the substring @\"::\"@, such as @\"foo::bar::quux\"@. Instead of
 -- searching for the index of @\"::\"@ and taking the substrings
--- before and after that index, you would instead use @find \"::\"@.
+-- before and after that index, you would instead use @breakOnAll \"::\"@.
 
 -- | /O(n)/ 'Text' index (subscript) operator, starting from 0.
 index :: Text -> Int -> Char

Data/Text/Lazy.hs

 -- >   where (prefix, match) = breakOn needle haystack
 --
 -- If you need to break a string by a substring repeatedly (e.g. you
--- want to break on every instance of a substring), use 'find'
+-- want to break on every instance of a substring), use 'breakOnAll'
 -- instead, as it has lower startup overhead.
 --
 -- This function is strict in its first argument, and lazy in its