# Strings

Strings in Internet Object represent sequences of Unicode codepoints. They are used for textual data and always preserve whitespace and formatting within their boundaries.

Internet Object supports three distinct string types, each with unique syntax and use cases:

```ebnf
stringValue = openString | regularString | rawString
```

| String Type                                                       | Description                                                               | Example Syntax               |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------- | ---------------------------- |
| [Open String](/the-structure/values/string/open-strings.md)       | Unquoted, simplest form, ends at structural character or whitespace.      | `John Doe`                   |
| [Regular String](/the-structure/values/string/regular-strings.md) | Quoted with double quotes, supports escaping and structural characters.   | `"John Doe"`                 |
| [Raw String](/the-structure/values/string/raw-strings.md)         | Prefixed with `r`, quoted with single or double quotes, minimal escaping. | `r'C:\path'` or `r"C:\path"` |

All string types preserve whitespace and Unicode content as written.

## When to Use Each String Type

* **Open String**: For simple, unstructured text without leading/trailing whitespace or special characters.
* **Regular String**: When you need to include structural characters, whitespace, or require escaping.
* **Raw String**: For text with many backslashes or quotes (e.g., file paths, regex), with minimal escaping and `r` prefix.

## See also

* [Schema for Strings](/schema-definition-language/data-types/string.md)
* [Number Types Overview](/the-structure/values/number.md)
* [Values](https://github.com/maniartech/InternetObject-specs/blob/gitbook/the-structure/values/values/README.md)


---

# 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://docs.internetobject.org/the-structure/values/string.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.
