Latest 1.0.9
Homepage https://github.com/Armanoide/VisualHumainNumber
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation
Authors

Build Status

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

  • [x] Negative number

Latest podspec

{
    "name": "VisualHumainNumber",
    "version": "1.0.9",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "platforms": {
        "ios": "8.0"
    },
    "summary": "Display big number with abbreviation",
    "homepage": "https://github.com/Armanoide/VisualHumainNumber",
    "authors": {
        "Billa Norbert": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Armanoide/VisualHumainNumber.git",
        "tag": "V1.0.9"
    },
    "source_files": "SRC/*.{swift}",
    "requires_arc": true,
    "frameworks": "Foundation",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This