query
On this page

hasPrefix

lib.strings.hasPrefix

Docs pulled from | This Revision | 12 minutes ago


Determine whether a string has given prefix.

Inputs

pref
Prefix to check for
str
Input string

Type

hasPrefix :: string -> string -> bool

Examples

lib.strings.hasPrefix usage example

hasPrefix "foo" "foobar"
=> true
hasPrefix "foo" "barfoo"
=> false

Noogle also knows

Aliases