Change 10.2019
This commit is contained in:
parent
7fbac395a9
commit
8f29c15a2b
6 changed files with 27 additions and 277 deletions
|
|
@ -31,8 +31,17 @@ class Util
|
|||
|
||||
public static function _format_number($value){
|
||||
return preg_replace("/[^0-9,]/", "", $value);
|
||||
|
||||
}
|
||||
|
||||
public static function _clean_float($value){
|
||||
$groups = explode(".", preg_replace("/[^0-9.]/", "", str_replace(',', '.', $value)));
|
||||
$lastGroup = array_pop($groups);
|
||||
$number = implode('', $groups);
|
||||
return (strlen($lastGroup) < 3) ? floatval($number.'.'.$lastGroup) : floatval($number.$lastGroup);
|
||||
}
|
||||
|
||||
|
||||
public static function sanitize($string, $force_lowercase = true, $anal = false, $substr = false)
|
||||
{
|
||||
$strip = array("~", "`", "!", "@", "#", "$", "%", "^", "&", "*", "(", ")", "_", "=", "+", "[", "{", "]",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue