String Starts With
Determines whether the s1 begins with the characters of string s2
Description
Determines whether a string begins with the characters of a specified string, returning true
or false
as appropriate.
Uses the startsWith
JavaScript function.
See <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" target="_blank">string object</a>.
Inputs
- s1 (String): The string to search.
- s2 (String): The string to be searched for at the start of s1.
- pos (Number): offset into the string where start the compare. default = 0
Outputs
- s1.startsWith(s2) (Boolean):
true
if s1 starts with s2