on master help sign in
Fix the documentation of stripPrefix
commitff1c3ad685f3e0a91d48cf5b6381c36c8b882748 authorHarendra Kumar <harendra@composewell.com> dateWed 7 Dec 2022, 19:07 (4 years ago) parentb79c87d
1 file changed+4−6
core/src/Streamly/Internal/Data/Stream/Eliminate.hs+4−6
core/src/Streamly/Internal/Data/Stream/Eliminate.hs+4−6
@@ -345,12 +345,10 @@ isSubsequenceOf m1 m2 = D.isSubsequenceOf (toStreamD m1) (toStreamD m2)
345345-- suffix/infix was present or not along with the stripped stream then
346346-- we need to buffer the whole input stream.
347347
348−-- | @stripPrefix prefix stream@ strips @prefix@ from @stream@ if it is a
349−-- prefix of stream. Returns 'Nothing' if the stream does not start with the
350−-- given prefix, stripped stream otherwise. Returns @Just nil@ when the prefix
351−-- is the same as the stream.
352−--
353−-- See also "Streamly.Internal.Data.Stream.Nesting.dropPrefix".
348+-- | @stripPrefix prefix input@ strips the @prefix@ stream from the @input@
349+-- stream if it is a prefix of input. Returns 'Nothing' if the input does not
350+-- start with the given prefix, stripped input otherwise. Returns @Just nil@
351+-- when the prefix is the same as the input stream.
354352--
355353-- Space: @O(1)@
356354--