> For the complete documentation index, see [llms.txt](https://osl.mistium.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://osl.mistium.com/legacy-osl-originos/prototype-helpers/.wraptext-characters.md).

# string.wrapText

## Description

Wraptext takes a string in real time and wraps it to a set number of characters

## Parameters

Wraptext needs the number of characters to limit each line to

## Usage On Strings

{% code overflow="wrap" %}

```javascript
num = "hello world, im doing pretty well"

log num.wrapText(15)
// hello world, im
// doing pretty
// well

// it inserts newlines into the string so that the text never goes over the limit but also so that the words arent split halfway through
```

{% endcode %}
