Gopher
FUNCTIONS

strings.HasSuffix

Determine whether or not a given string ends with the provided trailing suffix string.

Syntax

strings.HasSuffix STRING SUFFIX
{{ $pdfPath := "/path/to/some.pdf" }}
{{ strings.HasSuffix $pdfPath "pdf" }} → true
{{ strings.HasSuffix $pdfPath "txt" }} → false