KoreanCurrencyKit
Summary
KoreanCurrencyKit은 문자열로 입력받은 값에 대해 간편하게 한글금액 표기법으로 변환하여줍니다.
Usage
-
Use {String}.toKorean 표기방법 : 숫자 + 한글표기
소수점 앞자리 16자리까지만 화폐단위 표기
최대 '조' 단위 까지 표현 1,234조 5,678억 9,123만 4,567원
[요청]
"123456780".toKorean
[출력]
1억 2,345만 6,780원
- Use {String}.spellOut 표기방법 : 한글표기
[요청]
"123456780".spellOut
[출력]
일억 이천삼백사십오만 육천칠백팔십
- Use {String}.decimal 표기방법 : 숫자표기
[요청]
"123456780".decimal
[출력]
123,456,780
- Use {String}.currency 표기방법 : 원화표기
[요청]
"123456780".currency
[출력]
₩123,456,780
- Use {String}.ordinal 표기방법 : 서수표기
[요청]
"123456780".ordinal
[출력]
123,456,780번째
- Use {String}.percent 표기방법 : 퍼센트표기
[요청]
"123456780".percent
[출력]
12,345,678,000%
Quick Help
Requirement
iOS 11.0+/macOS 10.13+/tvOS 11.0+/watchOS 4.0+ Apple developer
iOS - 'v10' is deprecated : iOS 11.0 is the oldest supported version
macOS - 'v10_12' is deprecated : macOS 10.13 is the oldest supported version
tvOS - 'v10' is deprecated : tvOS 11.0 is the oldest supported version
watchOS - 'v3' is deprecated : watchOS 4.0 is the oldest supported version
Installation
File > Swift Packages > Add Package Dependency Add https://github.com/PotatoArtie/KoreanCurrencyKit.git Select "Up to Next Major" with 0.0.3
.package(url: "https://github.com/PotatoArtie/KoreanCurrencyKit.git", .upToNextMajor(from: "0.0.3"))
Coverage
License
KoreanCurrencyKit is under the MIT license. See the LICENSE for details.