function · Browser and Node

# utf8

`@toip-tools/trust-core` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/trust-core/src/encoding.ts#L16)

Import:

```ts
import { utf8 } from "@toip-tools/trust-core";
```

## Declaration

Signature:

```ts
utf8(s: string): Uint8Array;
```

### Parameters

- **`s` (required)**: `string`

### Returns

`Uint8Array<ArrayBufferLike>`

[Usage guide](https://toip.tools/toolkit/trust-core/#usage) · [Error handling](https://toip.tools/toolkit/trust-core/#errors) · [All exports](https://toip.tools/toolkit/trust-core/api/)

---

This is the Markdown version of https://toip.tools/toolkit/trust-core/api/utf8/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
