type: fhirpath-functionfunction: toCharscategory: String Manipulationsection: 5.6.14source: fhirpath/functions.json
FHIRPath Function: toChars
Returns the list of characters in the input string. 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.
'abc'.toChars() // { 'a', 'b', 'c' }
Summary
- Category: String Manipulation
- Section:
5.6.14 - Return Type:
collection - Empty Input Result:
empty - Errors on Multiple Input:
true
Description
Returns a collection with one string for each character in the input, in the order in which they appear in the string.
Arguments
Type Mapping
Example
'abc'.toChars() // {'a', 'b', 'c'}