on master help sign in
Fix complexity notation.
78714d4Bryan O'Sullivan
Data/Text.hs+4−4
@@ -401,7 +401,7 @@ reverse :: Text -> Text
401reverse t = S.reverse (stream t)
401reverse t = S.reverse (stream t)
402{-# INLINE reverse #-}
402{-# INLINE reverse #-}
403
403
404−-- | /O(m)*O(n)/ Replace every occurrence of one substring with another.
404+-- | /O(m*n)/ Replace every occurrence of one substring with another.
405replace :: Text -- ^ Text to search for
405replace :: Text -- ^ Text to search for
406 -> Text -- ^ Replacement text
406 -> Text -- ^ Replacement text
407 -> Text -- ^ Input text
407 -> Text -- ^ Input text
@@ -899,7 +899,7 @@ tails t | null t = [empty]
899-- copies to create substrings; they just construct new 'Text's that
899-- copies to create substrings; they just construct new 'Text's that
900-- are slices of the original.
900-- are slices of the original.
901
901
902−-- | /O(m)*O(n)/ Break a 'Text' into pieces separated by the first
902+-- | /O(m*n)/ Break a 'Text' into pieces separated by the first
903-- 'Text' argument, consuming the delimiter. An empty delimiter is
903-- 'Text' argument, consuming the delimiter. An empty delimiter is
904-- invalid, and will cause an error to be raised.
904-- invalid, and will cause an error to be raised.
905--
905--
@@ -935,7 +935,7 @@ split pat src0
935 split (singleton c) t = splitWith (==c) t
935 split (singleton c) t = splitWith (==c) t
936 #-}
936 #-}
937
937
938−-- | /O(m)*O(n)/ Break a 'Text' into pieces at most @k@ times,
938+-- | /O(m*n)/ Break a 'Text' into pieces at most @k@ times,
939-- treating the first 'Text' argument as the delimiter to break on,
939-- treating the first 'Text' argument as the delimiter to break on,
940-- and consuming the delimiter. The last element of the list contains
940-- and consuming the delimiter. The last element of the list contains
941-- the remaining text after the number of times to split has been
941-- the remaining text after the number of times to split has been
@@ -970,7 +970,7 @@ splitTimes k pat src0
970 | otherwise = search (n+1) (unsafeTail s)
970 | otherwise = search (n+1) (unsafeTail s)
971{-# INLINE splitTimes #-}
971{-# INLINE splitTimes #-}
972
972
973−-- | /O(m)*O(n)/ Break a 'Text' into pieces at most @k@ times, like
973+-- | /O(m*n)/ Break a 'Text' into pieces at most @k@ times, like
974-- 'splitTimes', but start from the end of the input and work towards
974-- 'splitTimes', but start from the end of the input and work towards
975-- the start.
975-- the start.
976--
976--