Lines Matching refs:str
29 public static function fromString(string $str, array $attributes = []): Float_ { argument
30 $attributes['rawValue'] = $str;
31 $float = self::parse($str);
41 * @param string $str A string number
45 public static function parse(string $str): float { argument
46 $str = str_replace('_', '', $str);
49 if ('0' === $str[0]) {
51 if ('x' === $str[1] || 'X' === $str[1]) {
52 return hexdec($str);
56 if ('b' === $str[1] || 'B' === $str[1]) {
57 return bindec($str);
61 if (false === strpbrk($str, '.eE')) {
64 return octdec(substr($str, 0, strcspn($str, '89')));
69 return (float) $str;