public function convertToFloat(Stringy $string, $decimalPoints = self::DECIMAL_POINTS)
    {
        if (!is_int($decimalPoints)) {
            $decimalPoints = self::DECIMAL_POINTS;
        }
        return (float) preg_replace('#(\d*)(\d{' . $decimalPoints . '})$#', '$1.$2', $string->__toString());
    }
public function convertToFloat(Stringy $string, $decimalPoints = self::DECIMAL_POINTS)
    {
        if (!is_int($decimalPoints)) {
            $decimalPoints = self::DECIMAL_POINTS;
        }
        return (float) preg_replace('#(\d*)(\d{' . $decimalPoints . '})$#', '$1.$2', $string->__toString());
    }
public function convertToFloat ( Stringy $ string , $ decimalPoints = self :: DECIMAL_POINTS ) { if ( ! is_int ( $ decimalPoints ) ) { $ decimalPoints = self :: DECIMAL_POINTS ; } return ( float ) preg_replace ( '#(\d*)(\d{' . $ decimalPoints . '})$#' , '$1.$2' , $ string -> __toString ( ) ) ; }
Converte uma stringy para um float, de acordo com a quantidade de casas decimais passadas
@param Stringy $string
@param int $decimalPoints
@return float
Converte uma stringy para um float de acordo com a quantidade de casas decimais passadas