How to use Raw String In Swift 5?
2 min readNov 18, 2019
We are discussing here how to use raw string usefulness in Swift 5?
Let’s go with examples
Use of # delimiter
We can use # delimiter with start and end of the strings to use less escape sequences.
Output:
This is “Swift 4.x”.
This is “Swift 5.x”.
Use of variables with # delimiter
We can use variable with string like \#(variableName)
Output:
This is “Swift 4.x” with variable.
This is “Swift 5.x” with variable.
Multiline String with # delimiter
We can use # delimiter in multiline strings too.
Output:
This is
Swift 5.
Conclusion
Swift is getting more stable day by day!