> 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/.osltokenise.md).

# string.oslTokenise

## Description

oslTokenise splits a string into an array of tokens, respecting quoted strings as single tokens. This is particularly useful for parsing command-like strings where some arguments might contain spaces.

## Parameters

oslTokenise takes no parameters.

## Usage On Strings

```javascript
str = 'hello "world is cool" lol'

log str.oslTokenise()
// ["hello", "\"world is cool\"", "lol"]
// splits by spaces but keeps quoted sections together

str2 = 'command arg1 "arg with spaces"'
log str2.oslTokenise()
// ["command", "arg1", "\"arg with spaces\""]
// useful for parsing command-like strings

str3 = 'simple no quotes'
log str3.oslTokenise()
// ["simple", "no", "quotes"]
// works like normal split when no quotes present
```
