ZVON > References > Haskell reference |
Intro / Search / ZVON |
| Indexes | Syntax | Prelude | Ratio | Complex | Numeric | Ix | Array | >> List << | Maybe | Char | Monad | IO | Directory | System | Time | Locale | CPUTime | Random |
Module: | List |
---|---|
Function: | isPrefixOf |
Type: | Eq a => [a] -> [a] -> Bool |
Description: | isPrefixOf and isSuffixOf check whether the first argument is a prefix (resp. suffix) of the second argument. |
Related: | isSuffixOf |
Input: isPrefixOf [1,2,3] [1,2,3,4,5]
Output: True
Input: isPrefixOf [2,3,4] [1,2,3,4,5]
Output: False
Input: isPrefixOf [] [1,2,3,4,5]
Output: True
Input: isPrefixOf "xyz" "xyzXYZ"
Output: True