# ParseString(string,string,bool)

Method in [LineParser](/api/csharp/yarn.markup/yarn.markup.lineparser.md)

## Summary

Parses a string of text and produces a markup parse result.

```csharp
public MarkupParseResult ParseString(string input, string localeCode, bool addImplicitCharacterAttribute = true)
```

## Parameters

| Name                                 | Description                                                                                                                  |
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| `string` input                       | The text to parse.                                                                                                           |
| `string` localeCode                  | The locale to use when processing markers, as a BCP-47 locale tag.                                                           |
| squish                               | If `false` , markers that are split as part of the markup parsing process will not be re-merged before returning the result. |
| sort                                 | If `true` , markers will be sorted based on their position in the input.å                                                    |
| `bool` addImplicitCharacterAttribute | If true, the parser will attempt to detect a character name in the text and add a `[character]` attribute for it.            |

## Returns

A markup parse result.


---

# 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.yarnspinner.dev/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.parsestring.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.
