Swift - Split string over multiple lines

前端 未结 15 2052
清酒与你
清酒与你 2020-12-04 07:51

How could I split a string over multiple lines such as below?

var text:String = \"This is some text
                   over multiple lines\"
15条回答
  •  臣服心动
    2020-12-04 08:44

    Sample

    var yourString = "first line \n second line \n third line"
    

    In case, you don't find the + operator suitable

提交回复
热议问题