hasSuffix

The hasPrefix and hasSuffix functions test whether a string has a given prefix or suffix:

hasPrefix "cat" "catch"

The above returns true because catch has the prefix cat.

Back to top