View raw Markdown
type: fhirpath-functionfunction: endsWithcategory: String Manipulationsection: 5.6.5source: fhirpath/functions.json

FHIRPath Function: endsWith

Returns true when the input string ends with the given suffix.

If suffix is the empty string (''), the result is true.

If the input collection is empty, the result is empty.

If the input collection contains multiple items, the evaluation of the expression will end and signal an error to the calling environment.

'abcdefg'.endsWith('efg') // true
'abcdefg'.endsWith('abc') // false

Summary

Description

Returns true when the input string ends with the given suffix.

Arguments

Type Mapping

Example

'abcdefg'.endsWith('efg') // true
'abcdefg'.endsWith('abc') // false