type: fhirpath-functionfunction: trimcategory: Additional String Functionssection: 5.7.5source: fhirpath/functions.json
FHIRPath Function: trim
{: .stu }
The trim function trims whitespace characters from the beginning and ending of the input string, with whitespace characters as defined in the Whitespace lexical category. {:.stu}
If the input is empty, the result is empty. {:.stu}
Summary
- Category: Additional String Functions
- Section:
5.7.5 - Return Type:
String - Empty Input Result:
empty - Errors on Multiple Input:
true
Description
Returns the input string with leading and trailing whitespace removed.
Arguments
Type Mapping
Example
' abc '.trim() // 'abc'
'\tabc\n'.trim() // 'abc'