I printed the same string from code and in console, and it seems that the \n
newline character is escaped differently.
Using print function in Swift code:
print(myString)
output:
"my String
and one more line"
Using print in console (or
po
same thing)print myString
output:
"my String\nand one more line"
How can I get the same multiline string by using print in console?