/**
* 数字去零
* @param $str_number
* @return string|string[]|null
*/
function zero($str_number)
{
return preg_replace('/(?:\.0*|(\.\d+?)0+)$/', '$1', $str_number);
}
PHP 数字去零
最新推荐文章于 2024-08-31 15:11:22 发布
/**
* 数字去零
* @param $str_number
* @return string|string[]|null
*/
function zero($str_number)
{
return preg_replace('/(?:\.0*|(\.\d+?)0+)$/', '$1', $str_number);
}