query
On this page

hasPrefix

lib.hasPrefix

Docs pulled from | This Revision | 11 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
(lib.strings.hasPrefix)

Noogle also knows

Aliases