如何在swift中打印空行

时间:2016-02-04 01:28:31

标签: swift line

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

1 个答案:

答案 0 :(得分:4)

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

简单......

输出:

this is some text

this is the end
相关问题