mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-22 06:13:58 -07:00
feat: Restore commify()
function
This commit is contained in:
parent
fd3bb34715
commit
2b5fa262b5
1 changed files with 8 additions and 0 deletions
|
@ -568,6 +568,14 @@ function url_arg($url, $arg, $value, $amp = '&')
|
|||
return $url . $anchor;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds commas between every group of thousands
|
||||
*/
|
||||
function commify($number): string
|
||||
{
|
||||
return number_format($number);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a size formatted in a more human-friendly format, rounded to the nearest GB, MB, KB..
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue