time-to-botec/js/node_modules/@stdlib/string/starts-with/docs/repl.txt
NunoSempere b6addc7f05 feat: add the node modules
Necessary in order to clearly see the squiggle hotwiring.
2022-12-03 12:44:49 +00:00

41 lines
944 B
Plaintext

{{alias}}( str, search[, position] )
Tests if a `string` starts with the characters of another `string`.
If provided an empty `search` string, the function always returns `true`.
Parameters
----------
str: string
Input string.
search: string
Search string.
position: integer (optional)
Position at which to start searching for `search`. If less than `0`, the
start position is determined relative to the end of the input string.
Returns
-------
bool: boolean
Boolean indicating whether a `string` starts with the characters of
another `string`.
Examples
--------
> var bool = {{alias}}( 'Beep', 'Be' )
true
> bool = {{alias}}( 'Beep', 'ep' )
false
> bool = {{alias}}( 'Beep', 'ee', 1 )
true
> bool = {{alias}}( 'Beep', 'ee', -3 )
true
> bool = {{alias}}( 'Beep', '' )
true
See Also
--------