Created
August 10, 2020 12:14
-
-
Save foxicode/a1dc6dda02432a22487ae6aac274f7a0 to your computer and use it in GitHub Desktop.
Converting Double to String
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| extension Double { | |
| func toString() -> String { | |
| String(format: "%.02f", self) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment