Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: msys
Compiler: gcc
Compilation CFLAGS: -march=nocona -msahf -mtune=generic -O2 -pipe
-D_STATIC_BUILD
uname output: MINGW64_NT-10.0-19045 Zack2021HPPavilion 3.5.3.x86_64
2024-06-03 06:22 UTC x86_64 Msys
Machine T
On Mon, Jun 17, 2024 at 3:48 AM Léa Gris wrote:
>
> Le 17/06/2024 à 09:17, Koichi Murase écrivait :
> >declare -i numvar=${localeFormatted/[!0-9]/.}
>
> This would break with negative numbers.
>
> I know no other radix separator than comma or dot. If there are other
> radix to replace, it can
Le 17/06/2024 à 09:17, Koichi Murase écrivait :
declare -i numvar=${localeFormatted/[!0-9]/.}
This would break with negative numbers.
I know no other radix separator than comma or dot. If there are other
radix to replace, it can be listed in a character class.
Lets say there are locales
2024年6月17日(月) 15:56 Léa Gris :
> Le 16/06/2024 à 23:44, Zachary Santer écrivait :
> Anyway, this could be handled with existing bash string replacement feature:
>
> localeFormatted=3,1415
> declare -i numvar=${localeFormatted/,/.}
Is the radix character in an arbitrary locale ensured to be either