AnyFormatProtocol
示例
要运行示例项目,请克隆仓库,然后从 Example 目录中先运行 pod install
。
需求
use: format<T>(Any?,deault: T) -> T
for example:
let int = format("1",default: 6) ==> 1
let int = format(nil,default: 6) ==> 6
let int = format(nil) ==> 0
安装
AnyFormatProtocol 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile:
pod "AnyFormatProtocol"
作者
许可证
AnyFormatProtocol遵循Apache License 2.0许可证。有关更多信息,请参阅LICENSE文件。