Skip to content
Chris Petersen edited this page Oct 16, 2014 · 4 revisions

string-suffix? returns true if the str ends with the pattern and false otherwise. This is case sensitive. For a case insensitive version, use string-suffix-ci?.

Parameter Description
pattern The suffix string to look for at the end of str
str Input string

Example

Example 1: Checking if a string ends with a suffix.

> (define mystr "spo2_median")
> (string-suffix? median" mystr)
#t
Clone this wiki locally