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
- Category: String Manipulation
- Section:
5.6.5 - Return Type:
Boolean - Empty Input Result:
empty - Errors on Multiple Input:
true
Description
Returns true when the input string ends with the given suffix.
Arguments
Type Mapping
Example
'abcdefg'.endsWith('efg') // true
'abcdefg'.endsWith('abc') // false