-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Digit grouping #11734
Comments
|
Probably an option to add to strformat formatting of numbers |
Well yes, but since it's deterministic, |
gives
|
@qqtop thanks, but looks like that doesnt work on windows |
nimcx is made for linux only but you are free to just extract the relevant procs |
just a small remark: |
@narimiran I just noticed an issue: import strutils
const aa = $(1234.56)
echo aa.insertSep(',') Result:
|
It is not an issue, it works as advertised: |
@cup can we mark this feauter request then as resolved? |
@krux02 um, no? It would be resolved if it was in the standard library, or if the developers are currently officially refusing to do that. |
for the reverse direction, see #15421 (comment) |
https://www.python.org/dev/peps/pep-0515/ is already in nim, so i guess it's mostly https://www.python.org/dev/peps/pep-0378/ to consider |
yeah, pep515 also introduces |
using needs |
Nim seems to have no way to format a number with commas or digit grouping.
Other languages offer this, for example C:
Python:
f'{1000:,}'
JavaScript:
PHP:
Go:
D:
(EDIT) links
The text was updated successfully, but these errors were encountered: