public static function toFloat($string)
    {
        $lc = localeconv();

        $string = self::parseNegativeNotation($string);

        // change all locale formatting to numeric formatting
        $remove_parts = array(
            $lc['decimal_point'] => '.',
            $lc['positive_sign'] => '',
            $lc['thousands_sep'] => ''
        );

        $value = str_replace(
            array_keys($remove_parts),
            array_values($remove_parts),
            $string
        );

        // note: This might be done better with a regexp, though
        // checking too closely how well a number matches its locale
        // formatting could become annoying too. i.e. if 1000 was
        // rejected because it wasn't formatted 1,000

        return is_numeric($value) ? floatval($value) : null;
    }