SE-0200: "Raw" mode string literals

One very simple solution is to extend the multiline string syntax to allow any number (at least 3) of double-quote characters as the delimiter:

let myVeryExcellentString = """"""""""""
    let address = """
        John Jacob Jingleheimer Schmidt
        555 Main Street
        Lake Wobegon, MN
        """
    print("\(address)")
    """"""""""""

If at least 4 double-quotes are used, then it is a raw string where nothing is escaped.

4 Likes