Allow underscores as separators in the math builtin (#8611)

* Implement fish_wcstod_underscores

* Add fish_wcstod_underscores unit tests

* Switch to using fish_wcstod_underscores in tinyexpr

* Add tests for math builtin underscore separator functionality

* Add documentation for underscore separators for math builtin

* Add a changelog entry for underscore numeric separators
This commit is contained in:
Andrey Mishchenko
2022-03-13 03:23:35 -07:00
committed by GitHub
parent 9ada7d9aad
commit 59e50f77bc
7 changed files with 129 additions and 1 deletions

View File

@@ -64,6 +64,8 @@ Syntax
For numbers, ``.`` is always the radix character regardless of locale - ``2.5``, not ``2,5``.
Scientific notation (``10e5``) and hexadecimal (``0xFF``) are also available.
``math`` allows you to use underscores as visual separators for digit grouping. For example, you can write ``1_000_000``, ``0x_89_AB_CD_EF``, and ``1.234_567_e89``.
Operators
---------