on master help sign in
Update documentation of stripPrefix
0bd72c5Harendra Kumar
src/Streamly/Internal/Data/Stream/IsStream.hs+4−4
@@ -1840,10 +1840,10 @@ isInfixOf infx stream = do
1840isSubsequenceOf :: (Eq a, IsStream t, Monad m) => t m a -> t m a -> m Bool
1840isSubsequenceOf :: (Eq a, IsStream t, Monad m) => t m a -> t m a -> m Bool
1841isSubsequenceOf m1 m2 = D.isSubsequenceOf (toStreamD m1) (toStreamD m2)
1841isSubsequenceOf m1 m2 = D.isSubsequenceOf (toStreamD m1) (toStreamD m2)
1842
1842
1843−-- | Strip prefix if present and tell whether it was stripped or not. Returns
1843+-- | @stripPrefix prefix stream@ strips @prefix@ from @stream@ if it is a
1844−-- 'Nothing' if the stream does not start with the given prefix, stripped
1844+-- prefix of stream. Returns 'Nothing' if the stream does not start with the
1845−-- stream otherwise. Returns @Just nil@ when the prefix is the same as the
1845+-- given prefix, stripped stream otherwise. Returns @Just nil@ when the prefix
1846−-- stream.
1846+-- is the same as the stream.
1847--
1847--
1848-- Space: @O(1)@
1848-- Space: @O(1)@
1849--
1849--