Returns a Boolean value indicating whether the string ends with the specified suffix.
- Xcode 6.0.1+
- Swift Standard Library
A possible suffix to test against this string.
true if the string ends with
The comparison is both case sensitive and Unicode safe. The case-sensitive comparison will only match strings whose corresponding characters have the same case.
The Unicode-safe comparison matches Unicode scalar values rather than the code points used to compose them. The example below uses two strings with different forms of the
"é" character—the first uses the composed form and the second uses the decomposed form.