Difference between revisions of "Freeside:1.7:Documentation:Developer/FS/UI/bytecount"
From Freeside
(import from POD) |
(import from POD) |
||
Line 10: | Line 10: | ||
:Returns a two decimal place value for COUNT followed by bytes, Kbytes, Mbytes, or GBytes as appropriate. | :Returns a two decimal place value for COUNT followed by bytes, Kbytes, Mbytes, or GBytes as appropriate. | ||
; parse_bytecount AMOUNT | ; parse_bytecount AMOUNT | ||
− | :Accepts a number (digits and a decimal point) possibly followed by k, m, g, or t (and an optional 'b') in either case. Returns a pure number representing the input or the input itself if unparsable. | + | :Accepts a number (digits and a decimal point) possibly followed by k, m, g, or t (and an optional 'b') in either case. Returns a pure number representing the input or the input itself if unparsable. Discards commas as noise. |
; display_bytecount AMOUNT | ; display_bytecount AMOUNT | ||
:Converts a pure number to a value followed possibly followed by k, m, g, or t via Number::Format | :Converts a pure number to a value followed possibly followed by k, m, g, or t via Number::Format |
Latest revision as of 19:11, 18 February 2008
Contents
NAME
FS::UI::bytecount - Subroutines for parsing and displaying byte counters
SYNOPSIS
use FS::UI::bytecount;
SUBROUTINES
- bytecount_unexact COUNT
- Returns a two decimal place value for COUNT followed by bytes, Kbytes, Mbytes, or GBytes as appropriate.
- parse_bytecount AMOUNT
- Accepts a number (digits and a decimal point) possibly followed by k, m, g, or t (and an optional 'b') in either case. Returns a pure number representing the input or the input itself if unparsable. Discards commas as noise.
- display_bytecount AMOUNT
- Converts a pure number to a value followed possibly followed by k, m, g, or t via Number::Format
BUGS
Fly