@param string $string

@return $this
329960
public function deleteLeading($string)
    {
        $this->value = Character::deleteLeading($string, $this->value);

        return $this;
    }
1108838
public static function fromString($string)
	{
		$fg      = '';
		$bg      = '';
		$options = array();

		$parts = explode(';', $string);

		foreach ($parts as $part)
		{
			$subParts = explode('=', $part);

			if (\count($subParts) < 2)
			{
				continue;
			}

			switch ($subParts[0])
			{
				case 'fg':
					$fg = $subParts[1];

					break;

				case 'bg':
					$bg = $subParts[1];

					break;

				case 'options':
					$options = explode(',', $subParts[1]);

					break;

				default:
					throw new \RuntimeException('Invalid option');

					break;
			}
		}

		return new self($fg, $bg, $options);
	}
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;
    }
164109
public static function fromString(string $string): self
    {
        $stringHeaders = explode(SourceInterface::DELIMETER_HEADER, $string);
        $headers       = [];

        foreach ($stringHeaders as $value) {
            [$name, $valueRow] = explode(SourceInterface::DELIMETER_HEADER_ROW, $value);

            $headers[$name] = $valueRow;
        }

        return new self($headers);
    }
242247
public function timerAction($string)
    {
        // Did we use this one before?
        if (isset(static::$counterCache[$string]) === true) {
            // Add another to the counter.
            ++static::$counterCache[$string];
            static::$timekeeping['[' . static::$counterCache[$string] . ']' . $string] = microtime(true);
        } else {
            // First time counter, set it to 1.
            static::$counterCache[$string] = 1;
            static::$timekeeping[$string] = microtime(true);
        }

        return $this;
    }
679380
public function startsWith($string)
	{
		$string = static::_convertString($string, $this->encoding);
		return $string === $this->substring(0, mb_strlen($string, $this->encoding)-1)->__toString();
	}
1307962
public function addString($key, $string)
    {
        $this->strings[$this->normalize($key)] = $string;

        return $this;
    }
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];
    }
899292
public function setGetfield($string)
    {
        if (!is_null($this->getPostfields())) 
        { 
            throw new Exception('You can only choose get OR post fields.'); 
        }
        
        $search = array('#', ',', '+', ':');
        $replace = array('%23', '%2C', '%2B', '%3A');
        $string = str_replace($search, $replace, $string);  
        
        $this->getfield = $string;
        
        return $this;
    }
647078
public function concat($string): self
    {
        Assert::typeOf(['string', __CLASS__], $string);

        return new static($this->data . $string, $this->encoding);
    }
1074734
public function before($string = '')
	{
		$lastUpdated = $this->lastUpdated;

		add_filter('wp_nav_menu_items', function ($items, $args) use ($lastUpdated, $string)
		{
			if ($args->theme_location == $lastUpdated)
			{
				$items = $string . $items;
			}
			return $items;

		}, 10, 2);

		return $this;
	}
138633
public static function fromString(string $string): self
    {
        if (1 !== \preg_match('/^(?>\r\n|\n|\r)$/', $string)) {
            throw Exception\InvalidNewLineStringException::fromString($string);
        }

        return new self($string);
    }
244841
protected function boldLn(string $string)
    {
        $this->bold($string);
        $this->output->writeln('');

        return $this;
    }
930904
protected function writeBinaryString(&$string){
        $ref = strlen($string) << 1 | 0x01;
        $this->writeInteger($ref);
        $this->_stream->writeBytes($string);

        return $this;
    }
758432
public function sub($string)
    {
        $this->timestamp = $this->getTimestamp() - $this->evaluateDateString($string);

        return $this;
    }
40295
public function setText(string $text)
    {
        $this
            ->getScanner()
            ->setText($text);
        $this->buffer = null;
        return $this;
    }
1232448
public function parse($string)
    {
        $hashModes = [];

        foreach($this->hashLibrary as $hash){
            if(preg_match('/'.$hash['regex'].'/i', $string)) {
                foreach($hash['modes'] as $mode) {
                    $hashModes[] = new HashMode([
                        'name' => $mode['name'],
                        'hashcat' => $mode['hashcat'],
                        'john' => $mode['john'],
                        'extended' => $mode['extended'],
                    ]);
                }
            }
        }

        $this->modes = $hashModes;
        return $this;
    }