Is there an alternate syntax for strings in Swift ? I need to copy/paste blocks of text including lots of quotes and escaping them each time is kind of a pain.
I'm looking for something like PHP's heredoc syntax, or Python's triple quoted strings. Similar to this question, but I don't care about newlines, I just need it to ignore quotes and backslashes.
Here's a concrete example of the disaster I'm facing right now :
let pattern = "(?:\["(this|is|a|pain|to|escape|properly)+)",0(?:,\[10\])?\])" // that makes me sad
let json = "window.google.ac.h(["this",[["is",0],["even",0],["worse",0]],{"q":"...","k":1}])" // that makes me cry
Thanks.