>>> "ld!" `isSuffixOf` "Hello World!" True
>>> "World" `isSuffixOf` "Hello World!" FalseThe second list must be finite; however the first list may be infinite:
>>> [0..] `isSuffixOf` [0..99] False
>>> [0..99] `isSuffixOf` [0..] * Hangs forever *
isSuffixOf x y == reverse x `isPrefixOf` reverse yHowever, the real implementation uses memcmp to compare the end of the string only, with no reverse required..
isSuffixOf x y == reverse x `isPrefixOf` reverse y
isSuffixOf x y == reverse x `isPrefixOf` reverse y
isSuffixOf x y == reverse x `isPrefixOf` reverse yHowever, the real implemenation uses memcmp to compare the end of the string only, with no reverse required..
>>> "ld!" `isSuffixOf` "Hello World!" True
>>> "World" `isSuffixOf` "Hello World!" False
>>> Stream.isSuffixOf (Stream.fromList "hello") (Stream.fromList "hello" :: SerialT IO Char) TrueSpace: O(n), buffers entire input stream and the suffix. Pre-release Suboptimal - Help wanted.
>>> "ld!" `isSuffixOf` "Hello World!" True >>> "World" `isSuffixOf` "Hello World!" FalseThe second list must be finite; however the first list may be infinite:
>>> [0..] `isSuffixOf` [0..99] False >>> [0..99] `isSuffixOf` [0..] * Hangs forever *
isSuffixOf x y == reverse x `isPrefixOf` reverse y
isSuffixOf x y == reverse x `isPrefixOf` reverse y
isSuffixOf x y == reverse x `isPrefixOf` reverse y
isSuffixOf x y == reverse x `isPrefixOf` reverse y
>>> Stream.isSuffixOf (Stream.fromList "hello") (Stream.fromList "hello" :: Stream IO Char) TrueSpace: O(n), buffers entire input stream and the suffix. Pre-release Suboptimal - Help wanted.