Version: v0.6.0 - 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