query
On this page

hasPrefix

lib.hasPrefix

Docs pulled from | This Revision | 39 minutes ago


Determine whether a string has given prefix.

Inputs

pref

Prefix to check for

str

Input string

Type

hasPrefix :: string -> string -> bool

Examples

hasPrefix usage example

hasPrefix "foo" "foobar"
=> true
hasPrefix "foo" "barfoo"
=> false
(lib.strings.hasPrefix)

Noogle also knows

Aliases