We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6be0835 commit 27a65adCopy full SHA for 27a65ad
src/Coduo/PHPHumanizer/String/BinarySuffix.php
@@ -67,7 +67,11 @@ protected function setSpecificPrecisionFormat($precision)
67
'up to three decimal places');
68
}
69
70
- $icuFormat = str_pad('#.', (2+$precision), '0');
+ $icuFormat = '#';
71
+ if($precision > 0){
72
+ $icuFormat .= str_pad('#.', (2+$precision), '0');
73
+ }
74
+
75
foreach ($this->binaryPrefixes as $size => $unitPattern) {
76
if($size >= 1024){
77
$symbol = substr($unitPattern, strpos($unitPattern, ' '));
0 commit comments