swift-currency:Swift中使用金钱的类型安全性和算法

时间:2021-03-08 17:29:41
【文件属性】:
文件名称:swift-currency:Swift中使用金钱的类型安全性和算法
文件大小:56KB
文件格式:ZIP
更新时间:2021-03-08 17:29:41
swift money algorithms carthage currency 迅捷货币 介绍 Swift Currency提供Swift中货币的类型安全表示。 它为使用货币提供了许多便利,例如文字表示,字符串插值和数学。 import Currency import Foundation let dollars = USD ( 30.01 ) print (dollars) // 30.01 USD print (dollars * 2 ) // 60.02 USD print (dollars. distributedEvenly ( intoParts : 6 )) // [USD(1.68), USD(1.68), USD(1.68), USD(1.67), USD(1.67), USD(1.67)] let pounds = GBP ( 109.23 ) print (dollars + pounds) // compile error let jpy:
【文件预览】:
swift-currency-master
----.mailmap(302B)
----.github()
--------workflows()
----Resources()
--------ISO4217.csv(6KB)
--------Info.plist(770B)
----Sources()
--------Currency()
----LICENSE.txt(1KB)
----CONTRIBUTORS.txt(693B)
----scripts()
--------generate_contributors_list.sh(2KB)
----Tests()
--------CurrencyTests()
--------LinuxMain.swift(121B)
----.codeclimate.yml(636B)
----NOTICE.txt(2KB)
----CONTRIBUTING.md(2KB)
----swift-currency.xcodeproj()
--------xcshareddata()
--------Currency_Info.plist(823B)
--------CurrencyTests_Info.plist(723B)
--------project.pbxproj(22KB)
----README.md(4KB)
----Package.swift(449B)
----docs()
--------Usage.md(14KB)
----CODE_OF_CONDUCT.md(3KB)
----.gitignore(75B)
----CHANGELOG.md(150B)

网友评论