Checks if value starts with searchString.
searchString
startsWith if value does not start with searchString.
startsWith
const startsWithId = startsWith("ID: ");startsWithId("123"); // Error: startsWithstartsWithId("ID: 123"); // passes Copy
const startsWithId = startsWith("ID: ");startsWithId("123"); // Error: startsWithstartsWithId("ID: 123"); // passes
The characters to be searched for at the start of value.
Checks if value starts with
searchString.Throws
startsWithif value does not start withsearchString.Example