Logo

Programming-Idioms

History of Idiom 96 > diff from v16 to v17

Edit summary for version 17 by :
New Haskell implementation by user [JH]

Version 16

2016-01-21, 09:16:35

Version 17

2016-02-16, 19:36:15

Idiom #96 Check string prefix

Set boolean b to true if string s starts with prefix prefix, false otherwise.

Idiom #96 Check string prefix

Set boolean b to true if string s starts with prefix prefix, false otherwise.

Imports
import Data.List
Code
b = prefix `isPrefixOf` s