View raw Markdown
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

Description

Returns the input string with leading and trailing whitespace removed.

Arguments

Type Mapping

Example

'  abc  '.trim() // 'abc'
'\tabc\n'.trim() // 'abc'