General usage of # in Swift

I am reading the Java​Script​Core article. In the article there is the following expression,

context.evaluateScript(#"""
function triple(number) {
    return number * 3;
}
"""#)

Three double quotes are used to delineate a multi-line string in Swift. My question is the hashtag usage at the beginning and end of the multi-line string expression.

Is there a specific name for this and its usage? Is a multi-line string in an instance method generally delineated by hashtags? Is there a general discussion somewhere as to when and where hashtags are employed in Swift?

Thanks!

It’s a raw string literal. See: How to use raw strings in Swift 5 – Hacking with Swift

The full proposal can be found here:

2 Likes

Thanks Karl!
I should have used the phrase pound sign instead of hashtag or the literal # when I searched. :pizza::beers: