--- type: "fhirpath-operator" title: "FHIRPath Operator: & (concatenate)" operator: "&" category: "Math" section: "6.6.7" source: "fhirpath/operations.json" --- # FHIRPath Operator: & (concatenate) For strings, will concatenate the strings, where an empty operand is taken to be the empty string. This differs from `+` on two strings, which will result in an empty collection when one of the operands is empty. This operator is specifically included to simplify treating an empty collection as an empty string, a common use case in string manipulation. ``` fhirpath 'ABC' + 'DEF' // 'ABCDEF' 'ABC' + { } + 'DEF' // { } 'ABC' & 'DEF' // 'ABCDEF' 'ABC' & { } & 'DEF' // 'ABCDEF' ``` ## Summary - **Category**: Math - **Section**: `6.6.7` - **Left Argument**: `String` - **Right Argument**: `String` - **Return Type**: `String` - **Empty Input Result**: `empty` - **Errors on Multiple Input**: `true` ## Description String concatenation operator. Concatenates the strings, where an empty operand is taken to be the empty string. This differs from `+` on strings, which results in empty collection when one operand is empty. ## Type Mapping - `String-String`