Skip to content

Armanoide/VisualHumainNumber

Repository files navigation

Build Status

VisualHumainNumber

Display big number with abbreviation

Note: Build on Xcode 8, swift 3

Install

use ~>"0.2.X" for swift3

use ~>"0.1.X" for swift2

use ~>"0.0.X" for swift1.2

To use this vendor add files VisualHumainNumber.swift to your Project or add pod 'VisualHumainNumber', to your podfile

alt tag

Basic

    let vhn = VisualHumainNumber(string: "53430345.83", separator: Character( " " ) )
    
    print(vhn.getVisualHumainNumbers(notation: VisualHumainNumberNotation.SeparatorHundred)) 
    // => 53 430 345
    vhn.setSeparator( Character( "," ) )
    print(vhn.getVisualHumainNumbers(notation: VisualHumainNumberNotation.SeparatorHundred)) 
    // =>  53,430,345
    print(vhn.getVisualHumainNumbers(notation: VisualHumainNumberNotation.SimpleHumain)) 
    // => 53M
    print(vhn.getVisualHumainNumbers(notation: VisualHumainNumberNotation.SeparatorHundredRounded))
    // => 53,430,345.83
    print(vhn.isNegative)
    // => fasle

Feature

  • Negative number

About

Display big number with abbreviation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •