2.1.2 • Published 6 years ago
string-starts-with-x v2.1.2
string-starts-with-x
Determines whether a string begins with the characters of a specified string.
module.exports
⇒ boolean ⏏
This method determines whether a string begins with the characters of a specified string, returning true or false as appropriate.
Kind: Exported member
Returns: boolean - true
if the given characters are found at the beginning
of the string; otherwise, false
.
Throws:
- TypeError If string is null or undefined.
- TypeError If searchString is a RegExp.
Param | Type | Description |
---|---|---|
string | string | The string to be search. |
searchString | string | The characters to be searched for at the start of this string. |
position | number | The position in this string at which to begin searching for searchString; defaults to 0. |
Example
import startsWith from 'string-starts-with-x';
const str = 'To be, or not to be, that is the question.';
startsWith(str, 'To be'); // true
startsWith(str, 'not to be'); // false
startsWith(str, 'not to be', 10); // true
2.1.2
6 years ago
2.1.1
6 years ago
2.1.0
6 years ago
2.0.13
6 years ago
2.0.12
6 years ago
2.0.11
6 years ago
2.0.10
6 years ago
2.0.9
6 years ago
2.0.8
6 years ago
2.0.7
6 years ago
2.0.6
6 years ago
2.0.5
6 years ago
2.0.4
6 years ago
2.0.3
6 years ago
2.0.2
6 years ago
2.0.1
6 years ago
2.0.0
6 years ago
1.1.0
8 years ago
1.0.0
8 years ago