mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Add parse float API
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -12299,6 +12299,19 @@ if ( $currentcertfile =~ /$defaultcertname$/ &&
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
# float(number)
|
||||
# Parses float number and returns it or returns 0 if cannot
|
||||
sub float
|
||||
{
|
||||
my ($number) = @_;
|
||||
my $float = sprintf('%.2f', $number);
|
||||
if ($float == 0.00) {
|
||||
return 0;
|
||||
}
|
||||
return $float;
|
||||
}
|
||||
|
||||
$done_web_lib_funcs = 1;
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user