hasSuffix(_:)
Returns a Boolean value that indicates whether a given string matches the ending characters of the receiver.
Declaration
func hasSuffix(_ str: String) -> BoolParameters
- str:
A string.
Return Value
true if aString matches the ending characters of the receiver, otherwise false. Returns false if aString is empty.
Discussion
This method is a convenience for comparing strings using the NSAnchoredSearch and NSBackwardsSearch options. See String Programming Guide for more information.