dotnet / dotnet/csharplang

[Proposal]: Raw string literal

Open
#8,647 2 comments 0 reactions 2 assignees Claimed by @jnm2 View on GitHub
Implemented Needs ECMA Spec Proposal champion
Dominant language
C#
Stars
12.7k
Forks
1.1k
Avg merge
11h 1m
Merged PRs (30d)
3

Description

# Raw string literal

* Specification: https://github.com/dotnet/csharplang/blob/main/proposals/csharp-11.0/raw-string-literal.md
* Discussion: https://github.com/dotnet/csharplang/discussions/8646

## Summary

Allow a new form of string literal that starts with a minimum of three `"""` characters (but no maximum), optionally followed by a `new_line`, the content of the string, and then ends with the same number of quotes that the literal started with. For example:

```
var xml = """

""";
```

## Design meetings

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.