【问题标题】:Print /n On xCode Playground [duplicate]在 xCode Playground 上打印 /n [重复]
【发布时间】:2016-04-01 00:55:54
【问题描述】:

当我在 Xcode Playground 中编写代码时,Play Ground Print "/n" On latest of my code result。我该如何解决?

【问题讨论】:

    标签: ios swift


    【解决方案1】:

    在 swift 2 中,不再有 println

    Print 现在等同于之前的println,所以它有“\n”。

    解决方法:

    print(saeed, terminator: "")
    

    【讨论】:

    • 阅读 khuong 所说的内容。如果添加terminator: "" 作为第二个参数,它不会在行尾添加换行符。
    猜你喜欢
    • 1970-01-01
    • 2012-11-24
    • 2016-02-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-21
    • 2016-03-31
    相关资源
    最近更新 更多