Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. isPrefixOf :: ShortByteString -> ShortByteString -> Bool

    bytestring Data.ByteString.Short

    O(n) The isPrefixOf function takes two ShortByteStrings and returns True iff the first is a prefix of the second.

  2. isSuffixOf :: ShortByteString -> ShortByteString -> Bool

    bytestring Data.ByteString.Short

    O(n) The isSuffixOf function takes two ShortByteStrings and returns True iff the first is a suffix of the second. The following holds:

    isSuffixOf x y == reverse x `isPrefixOf` reverse y
    

  3. stripPrefix :: ShortByteString -> ShortByteString -> Maybe ShortByteString

    bytestring Data.ByteString.Short

    O(n) The stripPrefix function takes two ShortByteStrings and returns Just the remainder of the second iff the first is its prefix, and otherwise Nothing.

  4. stripSuffix :: ShortByteString -> ShortByteString -> Maybe ShortByteString

    bytestring Data.ByteString.Short

    O(n) The stripSuffix function takes two ShortByteStrings and returns Just the remainder of the second iff the first is its suffix, and otherwise Nothing.

  5. isInfixOf :: ShortByteString -> ShortByteString -> Bool

    bytestring Data.ByteString.Short.Internal

    Check whether one string is a substring of another.

  6. isPrefixOf :: ShortByteString -> ShortByteString -> Bool

    bytestring Data.ByteString.Short.Internal

    O(n) The isPrefixOf function takes two ShortByteStrings and returns True iff the first is a prefix of the second.

  7. isSuffixOf :: ShortByteString -> ShortByteString -> Bool

    bytestring Data.ByteString.Short.Internal

    O(n) The isSuffixOf function takes two ShortByteStrings and returns True iff the first is a suffix of the second. The following holds:

    isSuffixOf x y == reverse x `isPrefixOf` reverse y
    

  8. stripPrefix :: ShortByteString -> ShortByteString -> Maybe ShortByteString

    bytestring Data.ByteString.Short.Internal

    O(n) The stripPrefix function takes two ShortByteStrings and returns Just the remainder of the second iff the first is its prefix, and otherwise Nothing.

  9. stripSuffix :: ShortByteString -> ShortByteString -> Maybe ShortByteString

    bytestring Data.ByteString.Short.Internal

    O(n) The stripSuffix function takes two ShortByteStrings and returns Just the remainder of the second iff the first is its suffix, and otherwise Nothing.

  10. commonPrefixes :: Text -> Text -> Maybe (Text, Text, Text)

    text Data.Text

    O(n) Find the longest non-empty common prefix of two strings and return it, along with the suffixes of each string at which they no longer match. If the strings do not have a common prefix or either one is empty, this function returns Nothing. Examples:

    >>> commonPrefixes "foobar" "fooquux"
    Just ("foo","bar","quux")
    
    >>> commonPrefixes "veeble" "fetzer"
    Nothing
    
    >>> commonPrefixes "" "baz"
    Nothing
    

Page 30 of many | Previous | Next