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

String.endsWith

endsWith($substring, $ignoreCase = false)

Description

Check that the end of the string matches $substring.

'abcdef'.endsWith('def');
//= true

'abcdef'.endsWith('DEF');
//= false

'abcdef'.endsWith('DEF', true);
//= true

See Also