ends with
Syntax
<subject> ends with <suffix>
if myFilename ends with ".txt" then output "It's text!"
Explanation
The ends with
operator tests whether an expression ends with the given text.
Parameters
subject
An expression to be examined for having a suffix.
suffix
The suffix with which you expect subject
to end.