pykot/pretty

Search:
Group by:

Make things beautiful.

Procs

func prettyNum(n: int; sep = ','): string {....raises: [], tags: [], forbids: [].}

Prettify a number by adding separators at the positions of thousands.

With the optional parameter sep, you can set the separator character.

Example:

doAssert prettyNum(2018) == "2,018"
doAssert prettyNum(1_234_567) == "1,234,567"