1
0
Fork 0
MySQLDumper/inc/classes/helper/String.php
2011-06-10 21:28:27 +00:00

37 Zeilen
Kein EOL
843 B
PHP

<?php
/**
* This file is part of MySQLDumper released under the GNU/GPL 2 license
* http://www.mysqldumper.net
*
* @package MySQLDumper
* @version SVN: $rev: $
* @author $Author$
* @lastmodified $Date$
*/
/**
* String-Helper Class
*
* Class has some static methods to modify String-output
*/
class String
{
/**
* Format the given number to better readable number
*
* @param float|int $number Number to format
* @param int $precision Selected format precision
*
* @return string Formatted number
*/
public static function formatNumber($number, $precision = 0)
{
$formattedNumber = number_format(
(float) $number,
(int) $precision,
',',
'.'
);
return $formattedNumber;
}
}