Multiline string literals don’t require quotes to be escaped
Basics article available: StringsOne really nice benefit of Swift’s multiline string literals - even for single lines of text - is that they don’t require quotes to be escaped. Perfect when working with things like HTML, or when creating a custom description for an object.
let html = highlighter.highlight("Array<String>")
XCTAssertEqual(html, """
<span class="type">Array</span><<span class="type">String</span>>
""")
Support Swift by Sundell by checking out this sponsor:

Raycast: Take the macOS Spotlight experience to the next level: Create Jira issues, manage GitHub pull requests and control other tools with a few keystrokes. Easily automate every-day tasks and boost your developer productivity by downloading Raycast for free.