TomlStringSyntax Class
A string, in any of its four forms: basic, literal, and the multi-line form of each.
public sealed class TomlStringSyntax : TomlValueSyntax- Inheritance
TomlValueSyntaxTomlStringSyntax
Properties
| Name | Description |
|---|---|
| IsLiteral | Gets a value indicating whether the string is written between single quotes, and has no escape sequences. |
| IsMultiLine | Gets a value indicating whether the string is written between three quotes, and may span lines. |
| StringToken | |
| Value | Gets the text of the string, with its quotes removed and its escape sequences resolved. |
IsLiteral
TomlStringSyntax.csIsMultiLine
TomlStringSyntax.csStringToken
TomlStringSyntax.csValue
TomlStringSyntax.csGets the text of the string, with its quotes removed and its escape sequences resolved.
public string Value { get; }Property value
Remarks
Line breaks in a multi-line string are line feeds, whichever line break the text uses.
When the string is in error, which SyntaxNode.ContainsDiagnostics tells, this is a best guess: an escape sequence that is not valid is left out or kept in part, and a string without its closing quotes runs to the end of its line, or of the text for a multi-line one. Check for diagnostics before relying on it.
Methods
| Name | Description |
|---|---|
| Accept(TomlSyntaxVisitor) | |
| Accept<TResult>(TomlSyntaxVisitor<TResult>) | |
| Update(SyntaxToken) | Returns this value with a different token, or itself when nothing changed. |
| WithStringToken(SyntaxToken) | |
| WithValue(string) | Returns this string with a new value, written as a basic string and escaped as TOML requires. |
Accept overloads
Accept(TomlSyntaxVisitor)
TomlStringSyntax.cspublic override void Accept(TomlSyntaxVisitor visitor)Parameters
visitorTomlSyntaxVisitor
No documentation is available.
Accept<TResult>(TomlSyntaxVisitor<TResult>)
TomlStringSyntax.cspublic override TResult? Accept<TResult>(TomlSyntaxVisitor<TResult> visitor)No documentation is available.
Update(SyntaxToken)
TomlStringSyntax.csReturns this value with a different token, or itself when nothing changed.
public TomlStringSyntax Update(SyntaxToken stringToken)WithStringToken(SyntaxToken)
TomlStringSyntax.cspublic TomlStringSyntax WithStringToken(SyntaxToken stringToken)No documentation is available.
WithValue(string)
TomlStringSyntax.csReturns this string with a new value, written as a basic string and escaped as TOML requires.
public TomlStringSyntax WithValue(string value)