Whether a given $string can be cast into a Point datatype.

@param string $string A string value.
@return boolean Wheter $string can be transformed to a Point datatype.
435583
public static function isPoint($string)
    {
        if (gettype($string) === 'string') {
            $parts = explode("\x20", $string);
            if (count($parts) == 2) {
                if (self::isInteger($parts[0]) && self::isInteger($parts[1])) {
                    return true;
                }
            }
        }

        return false;
    }
820933
public static function strlen( $string )
    {
        if ( false === ( $_encoding = static::mbSupported( $string ) ) )
        {
            return strlen( $string );
        }

        return mb_strwidth( $string, $_encoding );
    }
426195
public function write($string)
    {
        if (!\is_resource($this->stream)) {
            throw new \TypeError();
        }
        if (!$this->isWritable() || ($written = \fwrite($this->stream, $string)) === false) {
            throw new \RuntimeException('Could not write to stream');
        }
        if (!isset($written)) {
            $written = 0;
        }

        // reset size so that it will be recalculated on next call to getSize()
        $this->size = null;

        return (int) $written;
    }
966845
public static function stringToValue($string)
	{
		if($string == '')
		{
			return $string;
		}
		if(is_float($string))
		{
			return (float) $string;
		}
		if(is_int($string))
		{
			return (int) $string;
		}
		if(strtolower($string) == 'true')
		{
			return true;
		}
		if(strtolower($string) == 'false')
		{
			return false;
		}
		if(strtolower($string) == 'null')
		{
			return NULL;
		}
		
		return $string;
	}
801275
public static function isApplicable($string)
    {
        $firstline = strtok($string, "\r\n\t");
        $secondline = strtok("\r\n\t");

        return strpos($firstline, ':20:STARTUMS') !== false || ($firstline === '-' && $secondline === ':20:STARTUMS');
    }
801209
private function readRangeBound(string $string, int &$pos): ?string
    {
        $bound = null;
        while (true) {
            switch ($string[$pos]) {
                case ',':
                case ']':
                case ')':
                    break 2;

                case '"':
                    if (!preg_match('/"((?>[^"\\\\]+|\\\\.|"")*)"/As', $string, $m, 0, $pos)) {
                        throw TypeConversionException::parsingFailed($this, 'quoted string', $string, $pos);
                    }
                    $pos   += strlen($m[0]);
                    $bound .= strtr($m[1], ['\\\\' => '\\', '\\"' => '"', '""' => '"']);
                    break;

                default:
                    if (!preg_match("/(?>[^\"\\\\\\]),]+|\\\\.)+/As", $string, $m, 0, $pos)) {
                        throw TypeConversionException::parsingFailed($this, 'unquoted string', $string, $pos);
                    }
                    $pos   += strlen($m[0]);
                    $bound .= stripcslashes($m[0]);
            }
        }

        return $bound;
    }
162895
public function parseString($string)
    {
        //argument 1 must be a string
        Argument::i()->test(1, 'string');
        
        foreach ($this->data as $key => $value) {
            $string = str_replace($key, $value, $string);
        }

        return $string;
    }
310008
protected function inflect($string)
    {
        if (null === $this->inflector) {
            return $string;
        }

        return call_user_func($this->inflector, $string);
    }
1068055
public static boolean isLetterAndNumber(String string) {
        boolean result = isNotEmpty(string);
        int idx = 0;
        int len = string.length();
        while (result) {
            if (idx >= len) {
                break;
            }
            char c = string.charAt(idx);
            result = isLetter(c) || isNumber(c);
            idx++;
        }
        return result;
    }
1327479
protected function isSoftBool($string)
    {
        if (!is_scalar($string) || $string === null) {
            return false;
        }
        
        $string = (string) $string;
        
        return $string == '0' || $string == '1';
    }
551422
public function compareTo($string): int
    {
        Assert::typeOf(['string', __CLASS__], $string);

        return strcmp($this->data, (string) $string) <=> 0;
    }
713208
private function __fromCamel($string)
    {
        $string[0] = strtolower($string[0]);

        return preg_replace_callback('/([A-Z])/', function($c) {
            return "_" . strtolower($c[1]);
        }, $string);
    }
1086198
public function write($string)
    {
        $this->buffer .= $string;

        if (strlen($this->buffer) >= $this->hwm) {
            return false;
        }

        return strlen($string);
    }
905095
public static function isMessage(string $string): bool
    {
        return substr($string, 0, 2) == self::I18N_PREFIX
            && substr($string, -2) == self::I18N_POSTFIX;
    }
925490
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());
    }
525507
public function startsWith($string, int $offset = 0): bool
    {
        try {
            Assert::typeOf(['string', __CLASS__], $string);
        } catch (InvalidArgumentException|TypeError $t) {
            return false;
        }

        return mb_strpos($this->data, (string) $string, $offset, $this->encoding) === 0;
    }
105816
public static function mbSupported( $string = null )
    {
        $_encoding = false;

        if ( !function_exists( 'mb_strwidth' ) || ( $string && false === ( $_encoding = mb_detect_encoding( $string ) ) ) )
        {
            return false;
        }

        return $_encoding;
    }