如何在 swift 中打印空行

How to print an empty line in swift

这似乎是一个简单的问题,但我无法从网上找到答案。我想在 Swift 中打印一个空行。我试过 print("\n") 但它实际上打印了两个空行。我尝试了 print(),但出现编译器错误。

print("this is some text")
print("")
print("this is the end")

简单...

输出:

this is some text

this is the end