Skip to main content

chr

Description

Converts a numeric Unicode code point into its corresponding string character.

Syntax

Like many functions in DataPrime, chr supports two notations, function and method. These interchangeable forms allow flexibility in how you structure expressions.

chr(value: number): string

Arguments

NameTypeRequiredDescription
valuenumbertrueThe Unicode code point to convert into a character

Example

Convert a numeric code point into a Unicode character

Using chr, the numeric value can be rendered as its corresponding Unicode symbol. Consider the following document:

Example data

{
"emoji_numeric_value": 10084
}

Example query

create emoji_value from chr(emoji_numeric_value)

Example output

Both notations produce:

{
"emoji_numeric_value": 10084,
"emoji_value": "❤"
}
Was this page helpful?