DavidVanDerTuijn/number_format_to_decimal

数字格式转换为十进制

4.0 2022-03-31 07:36 UTC

This package is auto-updated.

Last update: 2024-09-29 13:01:23 UTC


README

Total Downloads Latest Stable Version License

Number Format To Decimal

数字格式到十进制的转换器是一个多功能的工具,旨在简化将数值从各种格式转换为标准十进制格式的过程。这种功能对于从事数据、金融或编程等职业的专业人士特别有益,在这些领域中精确的数值表示至关重要。

"Buy Me A Coffee"

安装

composer require davidvandertuijn/number_format_to_decimal

使用方法

number_format_to_decimal('1000,99'); // 1000.99
number_format_to_decimal('1000.99'); // 1000.99
number_format_to_decimal('1.000,99'); // 1000.99
number_format_to_decimal('1,000.99'); // 1000.99
number_format_to_decimal('10.000'); // 10000
number_format_to_decimal('100.000'); // 100000
number_format_to_decimal('10,000'); // 10000
number_format_to_decimal('100,000'); // 100000
number_format_to_decimal('1.000.000'); // 1000000
number_format_to_decimal('1.000.000,99'); // 1000000.99
number_format_to_decimal('1,000,000'); // 1000000
number_format_to_decimal('1,000,000.99'); // 1000000.99

评论

我已经使用这个脚本多年了,如果您有更好的解决方案,请告诉我!