Skip to content

Format to a fixed number of characters would be a nice addition #8

@ddofborg

Description

@ddofborg

Sometimes you want a fixed number of characters to be used for a number (for logging for example).

With 5 characters (this includes numbers, decimal points and magnitude):

4000000 => 4.00M
40000   => 40.0K
4000    => 4.00K
400     => 0.40K (400 and 400.0 are wrong as they take 3 and 5 places)
40      => 0.04K or 40.00
4       => 4.000

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions