LoginSignup
35
29

More than 5 years have passed since last update.

[Swift]改行の仕方

Posted at

Swiftでの改行の仕方を紹介します。

コード

let str:String = "New\nLine"

println(str)

出力結果

New
Line

まとめ

Objective-Cの頃と変わらず、\nで改行できます。
ちなみに自分は最初、バックスラッシュの打ち方がわからなかったのですが、
option + ¥ で打てます。

35
29
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
35
29