public static function fromString($str, $encoding = self::ENCODING){
		
		if(!\is_string($str)){
			throw new \InvalidArgumentException('$str must be a PHP string');
		}
		
		if(!\is_string($encoding)){
			throw new \InvalidArgumentException('$encoding must be a string');
		}
		
		return new static($str, $encoding);
		
	}
public static function fromString($str, $encoding = self::ENCODING){
		
		if(!\is_string($str)){
			throw new \InvalidArgumentException('$str must be a PHP string');
		}
		
		if(!\is_string($encoding)){
			throw new \InvalidArgumentException('$encoding must be a string');
		}
		
		return new static($str, $encoding);
		
	}
public static function fromString ( $ str , $ encoding = self :: ENCODING ) { if ( ! \ is_string ( $ str ) ) { throw new \ InvalidArgumentException ( '$str must be a PHP string' ) ; } if ( ! \ is_string ( $ encoding ) ) { throw new \ InvalidArgumentException ( '$encoding must be a string' ) ; } return new static ( $ str , $ encoding ) ; }
Create a String from a PHP string
@param string $str
@param string $encoding default is UTF-8
@return \static
Create a String from a PHP string