# str

> **str**(`value`): [`StrValue`](https://docs.arkiv.network/typescript-sdk/api-reference/main/type-aliases/strvalue/)

Defined in: [src/attr/values.ts:283](https://github.com/Arkiv-Network/arkiv-sdk-js/blob/5182f6d142de34497e0057b9fb39dce64f96f65a/src/attr/values.ts#L283)

A UTF-8 string of at most 128 bytes, indexed for equality and prefix (`STARTSWITH`) matching.

The limit is on **bytes**, not characters: a string of 128 emoji does not fit.

C0 control characters and DEL are rejected: the query language writes a `str` as `str('...')`,
whose only escape is a doubled quote, so a control character could be stored but never queried.

## Parameters

### value

`string`

## Returns

[`StrValue`](https://docs.arkiv.network/typescript-sdk/api-reference/main/type-aliases/strvalue/)

## Throws

If the value is not a string, holds a control character, or exceeds
128 UTF-8 bytes.

## Example

```ts
str("Bob")
```