# Module: `nupp.data.utf8`
UTF-8 codepoint operations over strings and byte views.
## Functions
### `decodeAt` _function_
```nupp
local decodeAt: function(value: string | nupp.io.ByteView, byteOffset: integer): (integer?, integer)
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `value` | `string | nupp.io.ByteView` | |
| `byteOffset` | `integer` | |
#### Returns
| Type | Description |
| --- | --- |
| `integer?` | |
| `integer` | |
### `decodeBefore` _function_
```nupp
local decodeBefore: function(value: string | nupp.io.ByteView, byteOffset: integer): (integer?, integer)
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `value` | `string | nupp.io.ByteView` | |
| `byteOffset` | `integer` | |
#### Returns
| Type | Description |
| --- | --- |
| `integer?` | |
| `integer` | |
### `encode` _function_
```nupp
local encode: function(codepoint: integer): string
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `codepoint` | `integer` | |
#### Returns
| Type | Description |
| --- | --- |
| `string` | |
### `isValid` _function_
```nupp
local isValid: function(value: string | nupp.io.ByteView): boolean
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `value` | `string | nupp.io.ByteView` | |
#### Returns
| Type | Description |
| --- | --- |
| `boolean` | |
### `length` _function_
```nupp
local length: function(value: string | nupp.io.ByteView): integer
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `value` | `string | nupp.io.ByteView` | |
#### Returns
| Type | Description |
| --- | --- |
| `integer` | |
### `truncate` _function_
```nupp
local truncate: function(text: string, maxBytes: integer): string
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `text` | `string` | |
| `maxBytes` | `integer` | |
#### Returns
| Type | Description |
| --- | --- |
| `string` | |
### `validPrefixLength` _function_
```nupp
local validPrefixLength: function(value: string | nupp.io.ByteView, maxBytes: integer): integer
```
#### Arguments
| Name | Type | Description |
| --- | --- | --- |
| `value` | `string | nupp.io.ByteView` | |
| `maxBytes` | `integer` | |
#### Returns
| Type | Description |
| --- | --- |
| `integer` | |