Parse a float value with localization in mind
@param  string $floatString The string representation of a floating number
@return float              The float value
480192
public static function parseFloat($floatString){ 
		    $LocaleInfo = localeconv(); 
		    $floatString = str_replace($LocaleInfo["mon_thousands_sep"] , "", $floatString); 
		    $floatString = str_replace($LocaleInfo["mon_decimal_point"] , ".", $floatString); 
		    return floatval($floatString); 
		}
609070
public static function FromString( string $objectString )
   {

      $hits = null;

      if ( ! \preg_match( '~^x=(\d{1,4});\s*y=(\d{1,4});\s*width=(\d{1,4});\s*height=(\d{1,4})$~',
         $objectString, $hits ) )
      {
         return false;
      }

      return self::Init(
         \intval( $hits[ 1 ] ),
         \intval( $hits[ 2 ] ),
         \intval( $hits[ 3 ] ),
         \intval( $hits[ 4 ] )
      );

   }
1181723
public function getFloatValue()
    {
        list($quotient, $remainder) = $this->big_integer->divide(self::precisionUnitsAsBigInt(1, $this->precision));
        return floatval($quotient->toString()) + floatval($remainder->toString() / pow(10, $this->precision));
    }
1176130
public function parseString($string)
    {
        $tokens = new Stack($this->tokenizer->tokenize($string));

        if ($tokens[0]->type === Tokenizer::T_EOF) {
            return new CTX\AccountInfoList();
        }

        $ctx = new CTX();
        $this->reduceStruct($tokens, $ctx);

        return $ctx->accountInfoList[0];
    }
90596
public static function value($str, $round = false)
    {
        if (is_string($str)) {
            $str = strtr($str, '.', '');
            $str = strtr($str, ',', '.');
        }

        $val = floatval($str);

        if ($round !== false) {
            $val = round($val, intval($round));
        }

        return $val;
    }
865593
public static function floatalize($value)
    {
        $value = strtoupper($value);
        if (strpos($value, 'E') === false) {
            return $value;
        }

        $number = substr($value, 0, strpos($value, 'E'));
        if (strpos($number, '.') !== false) {
            $post   = strlen(substr($number, strpos($number, '.') + 1));
            $mantis = substr($value, strpos($value, 'E') + 1);
            if ($mantis < 0) {
                $post += abs((int) $mantis);
            }

            $value = number_format($value, $post, '.', '');
        } else {
            $value = number_format($value, 0, '.', '');
        }

        return $value;
    }
198359
private function formatFloat($float, $digits)
    {
        $digits = max((int) $digits, 1);
        $string = rtrim(number_format($float, $digits, '.', ''), '0');

        return substr($string, -1) === '.' ? $string . '0' : $string;
    }
957189
private function parseValue($input)
    {
        if (is_array($input)) {

        } elseif (substr($input, 0, 1) === '"' && substr($input, -1) === '"') {
            $input = substr($input, 1, -1);
        } elseif (strpos($input, "|") !== false) {
            $input = explode("|", $input);
            foreach ($input as $key => $value) {
                $input[$key] = $this->parseValue($value);
            }
        } elseif ($input === "false") {
            $input = false;
        } elseif ($input === "true") {
            $input = true;
        } elseif (is_numeric($input)) {
            if (strpos($input, ".") !== false) {
                $input = (float)$input;
            } else {
                $input = (int)$input;
            }
        } elseif ($input === "on") {
            $input = true;
        }

        return $input;
    }
752165
protected function parseFlagOption($optionString)
    {
        for ($i = 0; $i < strlen($optionString); $i++) {
            $optionChar = substr($optionString, $i, 1);
            $optionParts = explode('=', substr($optionString, $i + 1));

            if (count($optionParts) > 1 && empty($optionParts[0])) {
                $value = $optionParts[1];
            } elseif ($optionChar !== "=") {
                $value = true;
            } else {
                break;
            }

            $this->flagOptions[$optionChar] = $value;
        }
        return $this;
    }
1028404
def FloatStringToFloat(float_string, problems=None):
  """"""
  # Will raise TypeError unless a string
  match = re.match(r"^[+-]?\d+(\.\d+)?$", float_string)
  # Will raise TypeError if the string can't be parsed
  parsed_value = float(float_string)

  if "x" in float_string:
    # This is needed because Python 2.4 does not complain about float("0x20").
    # But it does complain about float("0b10"), so this should be enough.
    raise ValueError()

  if not match and problems is not None:
    # Does not match the regex, but it's a float according to Python
    problems.InvalidFloatValue(float_string)
  return parsed_value
775418
protected function parseOption($optionString)
    {
        $optionParts = explode('=', $optionString);

        if (count($optionParts) > 1) {
            list($key, $value) = $optionParts;
        } else {
            $key   = $optionString;
            $value = true;
        }

        $this->options[$key] = $value;
        return $this;
    }
376298
protected Number parseFloat(String string) throws ParseException {
		try {
			return Double.valueOf(string);
		} catch (NumberFormatException e) {
			fail(FLOAT);
			return null;
		}
	}
210330
public function readFloat($isCollectionElement = false) {
		if ($isCollectionElement) {
				$this->readShort();
		}
		return unpack('f', strrev($this->read(4)))[1];
	}
10610
public static function parse_version_string($versionString) {
		if(is_null($versionString) || !strlen($versionString)) {
			throw new Exception(__METHOD__ .": invalid version string ($versionString)");
		}
		
		$suffix = "";
		$explodeThis = $versionString;
		if(preg_match('/-[A-Z]{2,5}[0-9]{1,}/', $versionString)) {
			$bits = explode('-', $versionString);
			$suffix = $bits[1];
			$explodeThis = $bits[0];
		}
		$tmp = explode('.', $explodeThis);
		
		
		if(is_numeric($tmp[0]) && is_numeric($tmp[1])) {
			$retval = array(
				'version_string'	=> $versionString,
				'version_major'		=> $tmp[0],
				'version_minor'		=> $tmp[1],
			);
			if(isset($tmp[2])) {
				$retval['version_maintenance'] = $tmp[2];
			}
			else {
				$retval['version_maintenance'] = 0;
			}
			
			$retval['version_suffix'] = $suffix;
		}
		else {
			throw new Exception(__METHOD__ .": invalid version string format, requires MAJOR.MINOR syntax (". $versionString .")");
		}
		
		return($retval);
	}
1178134
protected function parseRuleString($ruleString)
    {
        // Remove at-rule name and unnecessary white-spaces
        $ruleString = preg_replace('/^[ \r\n\t\f]*@supports[ \r\n\t\f]*/i', '', $ruleString);
        $ruleString = trim($ruleString, " \r\n\t\f");

        $charset = $this->getCharset();

        $conditions = [];

        foreach (Condition::splitNestedConditions($ruleString, $this->getCharset()) as $normalizedConditionList) {
            $normalizedConditions = [];
            $currentCondition = "";

            if (preg_match('/[^\x00-\x7f]/', $normalizedConditionList)) {
                $isAscii = false;
                $strLen  = mb_strlen($normalizedConditionList, $charset);
                $getAnd  = function($i) use ($normalizedConditionList){
                    return strtolower(substr($normalizedConditionList, $i, 5));
                };
            } else {
                $isAscii = true;
                $strLen = strlen($normalizedConditionList);
                $getAnd  = function($i) use ($charset, $normalizedConditionList){
                    return mb_strtolower(mb_substr($normalizedConditionList, $i, 5, $charset), $charset);
                };
            }

            for ($i = 0, $j = $strLen; $i < $j; $i++) {
                if ($isAscii === true) {
                    $char = $normalizedConditionList[$i];
                } else {
                    $char = mb_substr($normalizedConditionList, $i, 1, $charset);
                }

                if ($char === " " && $getAnd($i) === " and ") {
                    $normalizedConditions[] = new SupportsCondition(trim($currentCondition, " \r\n\t\f"));
                    $currentCondition = "";
                    $i += (5 - 1);
                } else {
                    $currentCondition .= $char;
                }
            }
            $currentCondition = trim($currentCondition, " \r\n\t\f");
            if ($currentCondition !== "") {
                $normalizedConditions[] = new SupportsCondition(trim($currentCondition, " \r\n\t\f"));
            }

            foreach ($normalizedConditions as $normalizedCondition) {
                $conditions[] = $normalizedCondition;
            }
        }

        $this->setConditions($conditions);
    }
1339199
public function parseString($string)
    {
        $string = (string) $string;
        $string = preg_replace_callback("/\\$\{(.*?)\}/",
            function ($k) {
                return $this->get($k[1]);
            }, $string);

        return $string;
    }
1271867
protected function parseNumberTags(string $string): string
	{
		return preg_replace_callback('/\<number(:([0-9]+)(,(.)(,(.))?)?)?\>([0-9-.e]*)\<\/number\>/iu', function($matches)
		{
			return $this->number((float) $matches[7], ($matches[2] ?: 0), $matches[4], $matches[6]);
		}, $string);
	}