ZigZagZebra
ZigZagZebra

Reputation: 1459

How to print an empty line in swift

It seems to be a simple question but I cannot find the answer from the web. I want to print an empty line in Swift. I tried print("\n") but it actually prints two empty lines. I tried print() but I get a complier error.

Upvotes: 1

Views: 1677

Answers (1)

Eendje
Eendje

Reputation: 8883

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

It is simple...

Output:

this is some text

this is the end

Upvotes: 5

Related Questions