swift-print

let x = 1, y = 2, z = 3, A = true

1. print(x, y, z, A)    默认输出有空格隔开 `separator ` 且具有换行功能

输出:1 2 3 true

2. print(x, y, z, separator:"*")   手动设置以 `*` 结尾

输出:1*2*3

3.  `terminator `结尾标识符,加上之后不具有换行功能
print(x, y, z, separator:"--", terminator:"结尾")
print(">>>>>>")

输出:1--2--3结尾>>>>>>

4. 变长的参数

print("hello", 1, 2, 3, 4, 5, 6, 7, 8, 9,  separator:" ", terminator:".")

你可能感兴趣的:(swift-print)