Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdataprime%2Flanguage-reference%2Ffunctions-reference%2Fstring%2Fcodepoint.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdataprime%2Flanguage-reference%2Ffunctions-reference%2Fstring%2Fcodepoint.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

# `codepoint`

## Description

Converts a Unicode character into its numeric code point representation.

## Syntax

Like many functions in DataPrime, `codepoint` supports<!-- --> [two notations](https://docs-docusaurus.kinsta.page/dataprime/language-reference/functions-reference/.md),<!-- --> **function** and **method**. These interchangeable forms allow flexibility in how you structure expressions.

* Function notation
* Method notation

```
codepoint(value: string): number
```

```
(value: string).codepoint(): number
```

## Arguments

| Name    | Type     | Required | Description                                                |
| ------- | -------- | -------- | ---------------------------------------------------------- |
| `value` | `string` | **true** | The Unicode character to convert into a numeric code point |

## Example

**Convert a Unicode character into its numeric representation**

Using `codepoint`, the character can be translated into its numeric value. Consider the following document:

### Example data

```
{

    "emoji_value": "❤"

}
```

### Example query

* Function notation
* Method notation

```
create emoji_numeric_value from codepoint(emoji_value)
```

```
create emoji_numeric_value from emoji_value.codepoint()
```

### Example output

```
{

    "emoji_value": "❤",

    "emoji_numeric_value": 10084

}
```
