Minus sign in Swift

// From Ole Begemman's blog // Using the minus sign with NSNumberFormatter in Swift let myNumber = -5 let formatter = NSNumberFormatter() formatter.minusSign = "\u{2212}" let myPrettyNumberString = formatter.stringFromNumber(myNumber)

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.