EndsWith
Tests whether a string ends with a specified suffix.
Signature
EndsWith(string text, string suffix)
Parameters
- text (string): The string to test.
- suffix (string): The suffix to search for.
Returns
- boolean:
trueiftextends withsuffix,falseotherwise.
Description
Uses String.EndsWith. The comparison is case-sensitive.
Examples
var a = EndsWith("Hello, World", "World")
# a = true
var b = EndsWith("document.pdf", ".pdf")
# b = true
var c = EndsWith("Hello", "hello")
# c = false (case-sensitive)