> For the complete documentation index, see [llms.txt](https://docs.yarnspinner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.parsestring.md).

# ParseString(string,string,bool)

Method in [LineParser](/3.1/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.
