Swift3 标准库中的全局函数

2016-10-25  本文已影响34人  曲终人散Li

//求绝对值
func abs<T>(T)

//断言
func assert(() -> Bool, () -> String, file: StaticString, line: Uint)

//合理性检查失败
func assertionFailure(() -> String, file: StaticString, line: Uint)

//标准输出调试
func debugPrint(Any..., separator: String, terminator: String)

//输出流调试
func debugPrint<Target>(Any..., separator: String, terminator: String, to: inout Target)

//标准输入一个对象的内容
func dump<T>(T, name: String?, indent: Int, maxDepth: Int, maxItems: Int)

//指定输出流输出一个对象的内容
func dump<T, TargetStream>(T, to: inout TargetStream, name: String?, indent: Int, maxDepth: Int, maxItems: Int)

//打印给定的信息并停止执行
func fatalError(() -> String, file: StaticString, line: Uint)

func getVaList([CVarArg])

上一篇 下一篇

猜你喜欢

热点阅读