KMBFormatter

0.0.1

A number formatter that adds K for thousands, M for millions and B for billions
a-sarris/KMBFormatter

What's New

Initial Release

2021-11-29T19:26:13Z

KMBFormatter

A number formatter that adds K for thousands, M for millions and B for billions

Sample usage:

let formatter = KMBFormatter()
formatter.string(fromNumber: 1009) // 1K
formatter.string(fromNumber: 5000000) // 5M
formatter.string(fromNumber: 999999) // 999.9K

Used ByteCountFormatter.swift as a reference.

Description

  • Swift Tools 5.5.0
View More Packages from this Author

Dependencies

  • None
Last updated: Sun Oct 20 2024 02:12:39 GMT-0900 (Hawaii-Aleutian Daylight Time)