Change decimal point to a real point
@param string $value
@return string
161880
protected function numberToEnglish(string $value): string
    {
        if ('.' !== $this->getDecimalPoint()) {
            return str_replace($this->getDecimalPoint(), '.', $value);
        }
        return $value;
    }
819302
public static function format($value)
    {
        $value = (string) $value;

        if (Utils::isAddress($value)) {
            $value = mb_strtolower($value);

            if (Utils::isZeroPrefixed($value)) {
                return $value;
            }
            return '0x' . $value;
        }
        $value = IntegerFormatter::format($value, 40);

        return '0x' . $value;
    }
1016298
private function castValue(string $value)
    {
        $value = $this->normalize($value);
        if (\preg_match('/^[0-9]+$/', $value)) {
            $value = (int)$value;
        } elseif (\preg_match('/^[0-9\.]+$/', $value)) {
            $value = (float)$value;
        } elseif (\preg_match('/^true|false$/', $value)) {
            $value = $value === 'true' ? true : false;
        }
        return $value;
    }
583689
public function convert($value)
    {
        switch (gettype($value)) {
            case 'string':
                $result = '\'' . pg_escape_string($value) . '\'';
                break;
            case 'array':
                $data = array_map(function ($item) {
                    return $this->convert($item);
                }, $value);

                $result = '[' . implode(',', $data) . ']';
                break;
            case 'double':
            case 'integer':
                $result = $value < -2147483648 || 2147483647 < $value ? $value . '::bigint' : $value;
                break;
            case 'NULL':
                $result = 'null';
                break;
            case 'boolean':
                $result = $value ? 'true' : 'false';
                break;
            default:
                throw new DbException('Unsupported type ' . gettype($value), DbException::WRONG_TYPE);
        }

        return $result;
    }
1104160
public static function float($value, int $precision = 2) :float {
		if(strrpos($value, '.')) {
			$value = str_replace(',', '' , $value);
		}
		elseif(strrpos($value, ',')) {
			$value = str_replace('.', '' , $value);
		} 
		return(floatval(
			round(preg_replace('/[^0-9.\-]/', '', str_replace(',', '.' , $value)), $precision)
		));
	}
810604
private function numberFormat($value, $decimals, $decimalPoint, $thousandSeperator)
    {
        if (is_null($decimals)){
            $decimals = is_null(config('cart.format.decimals')) ? 2 : config('cart.format.decimals');
        }

        if (is_null($decimalPoint)){
            $decimalPoint = is_null(config('cart.format.decimal_point')) ? '.' : config('cart.format.decimal_point');
        }

        if (is_null($thousandSeperator)){
            $thousandSeperator = is_null(config('cart.format.thousand_seperator')) ? ',' : config('cart.format.thousand_seperator');
        }

        return number_format($value, $decimals, $decimalPoint, $thousandSeperator);
    }
1269595
public function setLatitude($value)
    {
        if (is_float($value) || is_int($value) || (is_string($value) && is_numeric($value))) {
            $this->latitude = (float) $value;
        } else {
            $this->latitude = null;
        }

        return $this;
    }
676273
public static function format(float $value) : string
    {
        $formatter = new NumberFormatter(self::translator()->getIETF(), NumberFormatter::DECIMAL);

        return $formatter->format($value);
    }
529521
protected function serializeValue($value)
    {
        if ($this->isSerializable($value) === true) {
            // Activate default bit to detect serialization
            $value = serialize($value);
            $bytes = strlen($value);
            $flags = self::FLAG_DECIMAL_SERIALIZED;

        } else {
            // Real numbers should keep real numbers - Bit 2 = int , 3 = double/float
            if (is_int($value) === true) {
                $flags = self::FLAG_DECIMAL_INTEGER;

            } elseif (is_float($value) === true) {
                $flags = self::FLAG_DECIMAL_FLOAT;

            } elseif (is_string($value) === true) {
                // Never serialize strings! Otherwise append() & prepend() won't work!
                $flags = self::FLAG_DECIMAL_STRING;

            } elseif (is_bool($value) === true) {
                $value = strval($value);
                $flags = self::FLAG_DECIMAL_BOOLEAN;

            } else {
                throw new Exception(
                    sprintf('Unhandable value. Don\'t know how to process!')
                );
            }

            $bytes = strlen($value);
        }

        return array(
            'value' => $value,
            'flags' => $flags,
            'bytes' => $bytes,
        );
    }
932525
public static function decimal( $value, $decimals = 2 )
	{
		$nf = new \NumberFormatter(\Locale::getDefault(), \NumberFormatter::DECIMAL);
		$nf->setAttribute(\NumberFormatter::MAX_FRACTION_DIGITS, $decimals);
		return $nf->format($value);
	}
14541
public static function decimalFormat($value)
    {
        if (is_int($value)) {
            return $value;
        }else if (is_float($value)) {
            if (strcspn(strrev($value), '.') >= 3) {
                $value = floor($value * 100) / 100;
            }
        }
        return (string)number_format($value, 2, '.', '');
    }
126769
private function getNumericValue(string $value)
    {
        if (\strpos($value, '.') !== false) {
            return (float) $value;
        }

        return (int) $value;
    }
625386
protected function getDisplayValue($value)
    {
        // if the value is valid, format accordingly
        if (!$this->hasMessage() && is_numeric($value)) {
            $value = SwatI18NLocale::get($this->locale)->formatCurrency(
                $value,
                false,
                array('fractional_digits' => $this->decimal_places)
            );
        }

        return $value;
    }
473429
public static function format($value)
    {
        $formatFunction = Config::get('shop.display_price_number_format') ?: function($price) { return number_format($price, 2); };
        return preg_replace(
            [
                '/:symbol/',
                '/:price/',
                '/:currency/'
            ],
            [
                Config::get('shop.currency_symbol'),
                $formatFunction($value),
                Config::get('shop.currency')
            ],
            Config::get('shop.display_price_format')
        );
    }
1035596
private function getRatio(string $value) : float
    {
        if (strpos($value, '%') !== false) {
            $result = ((float)str_replace('%', '', $value)) / 100;
        } else {
            $result = $value;
        }

        return (float)$result;
    }
696445
public function filter($value)
    {
        if (empty($value)) {
            return $value;
        }

        return number_format(floatval($value), $this->decimals, $this->decimalPoint, $this->thousandSeparator);
    }
637969
protected function changeValueEncoding($value)
    {
        if (null !== $this->changeEncoding) {
            $value = call_user_func($this->changeEncoding, $value);
        }

        return $value;
    }