Version: v0.5.1 - Beta.  We welcome contributors & feedback.  THanks!

String.startsWith

startsWith(substring, ignoreCase = false)

Description

Check that the beginning of the string matches substring.

'abcdef'.startsWith('abc');
//= true

'abcdef'.startsWith('ABC');
//= false

'abcdef'.startsWith('ABC', true);
//= true

See Also