startsWith
function, since version 1.1.5
categories: strings
startsWith(str, prefix)
returns true if input string str
starts with prefix
parameters
- str: string - input string
- prefix: string - prefix
return type:
boolean
examples
startsWith('hello there', 'hello')
startsWith('hello there', 'there')
returns
true
false