True if string s ends with suffix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | s |
the string, and the ending to look for |
||
| character(len=*), | intent(in) | :: | suffix |
the string, and the ending to look for |
pure logical function ends_with(s, suffix) !! True if string `s` ends with `suffix`. character(len=*), intent(in) :: s, suffix !! the string, and the ending to look for ends_with = .false. if (len(s) >= len(suffix)) ends_with = s(len(s) - len(suffix) + 1:) == suffix end function ends_with