RMB 0.2.0

RMB 0.2.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Oct 2015
SPMSupports SPM

Maintained by Banxi Lee.



RMB 0.2.0

RMB

用法

安装

  1. 使用 CocoasPods。
pod "RMB"
  1. 手动,将项目的 RMB.swift 文件添加到你的项目中。

使用

可以通过查看测试用例,如下,对它就是这样使用的。 如果是使用 pod 安装,先导入: import RMB

    XCTAssertEqual(convertNumberToAmountOfRMB(10300.05), "壹万零叁佰元零伍分")
    XCTAssertEqual(convertNumberToAmountOfRMB(130.05), "壹佰叁拾元零伍分")
    XCTAssertEqual(convertNumberToAmountOfRMB(13.06), "壹拾叁元零陆分")
    XCTAssertEqual(convertNumberToAmountOfRMB(3.58), "叁元伍角捌分")
    XCTAssertEqual(convertNumberToAmountOfRMB(9.7), "玖元柒角")
    XCTAssertEqual(convertNumberToAmountOfRMB(1234567890.08),"壹拾贰亿叁仟肆佰伍拾陆万柒仟捌佰玖拾元零捌分")

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

RMB is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "RMB"

Author

banxi1988, [email protected]

License

RMB is available under the MIT license. See the LICENSE file for more info.