# .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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://osl.mistium.com/methods/strings/.osltokenise.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
