@wtasnorg/node-lib / hasPrefixString
hasPrefixString(
s,prefix):boolean
Defined in: src/strings.ts:448
HasPrefix reports whether the string s begins with prefix.
string
Input string.
string
Prefix to check.
boolean
True if s starts with prefix.
hasPrefix("Gopher", "Go"); // true
hasPrefix("Gopher", ""); // true — empty prefix always matches
hasPrefix("Gopher", "X"); // false
hasPrefix("ab", "abc"); // false — prefix longer than s