@tempots/std

stringStartsWith() function

Checks if a string starts with a specified substring.

Signature:

stringStartsWith: (s: string, start: string) => boolean

Parameters

Parameter

Type

Description

s

string

The string to check.

start

string

The substring to check for at the beginning of the string.

Returns: boolean

true if the string starts with the specified substring, false otherwise.