on master help sign in
Fix mistakes in docs (gh-127)
824f1f2Bryan O'Sullivan
Data/Text.hs+3−2
@@ -1188,8 +1188,9 @@ dropWhile p t@(Text arr off len) = loop 0 0
1188 #-}
1188 #-}
1189
1189
1190-- | /O(n)/ 'dropWhileEnd' @p@ @t@ returns the prefix remaining after
1190-- | /O(n)/ 'dropWhileEnd' @p@ @t@ returns the prefix remaining after
1191−-- dropping characters that fail the predicate @p@ from the end of
1191+-- dropping characters that satisfy the predicate @p@ from the end of
1192-- @t@. Subject to fusion.
1192-- @t@. Subject to fusion.
1193+--
1193-- Examples:
1194-- Examples:
1194--
1195--
1195-- > dropWhileEnd (=='.') "foo..." == "foo"
1196-- > dropWhileEnd (=='.') "foo..." == "foo"
@@ -1209,7 +1210,7 @@ dropWhileEnd p t@(Text arr off len) = loop (len-1) len
1209 #-}
1210 #-}
1210
1211
1211-- | /O(n)/ 'dropAround' @p@ @t@ returns the substring remaining after
1212-- | /O(n)/ 'dropAround' @p@ @t@ returns the substring remaining after
1212−-- dropping characters that fail the predicate @p@ from both the
1213+-- dropping characters that satisfy the predicate @p@ from both the
1213-- beginning and end of @t@. Subject to fusion.
1214-- beginning and end of @t@. Subject to fusion.
1214dropAround :: (Char -> Bool) -> Text -> Text
1215dropAround :: (Char -> Bool) -> Text -> Text
1215dropAround p = dropWhile p . dropWhileEnd p
1216dropAround p = dropWhile p . dropWhileEnd p
Data/Text/Lazy.hs+4−2
@@ -1176,9 +1176,11 @@ dropWhile p t0 = dropWhile' t0
1176"LAZY TEXT dropWhile -> unfused" [1] forall p t.
1176"LAZY TEXT dropWhile -> unfused" [1] forall p t.
1177 unstream (S.dropWhile p (stream t)) = dropWhile p t
1177 unstream (S.dropWhile p (stream t)) = dropWhile p t
1178 #-}
1178 #-}
1179+
1179-- | /O(n)/ 'dropWhileEnd' @p@ @t@ returns the prefix remaining after
1180-- | /O(n)/ 'dropWhileEnd' @p@ @t@ returns the prefix remaining after
1180−-- dropping characters that fail the predicate @p@ from the end of
1181+-- dropping characters that satisfy the predicate @p@ from the end of
1181-- @t@.
1182-- @t@.
1183+--
1182-- Examples:
1184-- Examples:
1183--
1185--
1184-- > dropWhileEnd (=='.') "foo..." == "foo"
1186-- > dropWhileEnd (=='.') "foo..." == "foo"
@@ -1195,7 +1197,7 @@ dropWhileEnd p = go
1195{-# INLINE dropWhileEnd #-}
1197{-# INLINE dropWhileEnd #-}
1196
1198
1197-- | /O(n)/ 'dropAround' @p@ @t@ returns the substring remaining after
1199-- | /O(n)/ 'dropAround' @p@ @t@ returns the substring remaining after
1198−-- dropping characters that fail the predicate @p@ from both the
1200+-- dropping characters that satisfy the predicate @p@ from both the
1199-- beginning and end of @t@. Subject to fusion.
1201-- beginning and end of @t@. Subject to fusion.
1200dropAround :: (Char -> Bool) -> Text -> Text
1202dropAround :: (Char -> Bool) -> Text -> Text
1201dropAround p = dropWhile p . dropWhileEnd p
1203dropAround p = dropWhile p . dropWhileEnd p