Copies some code to the compressed code without modification. The current position will be after the specified
string.
@param string $string The string until which the code should be copied.
543665
protected function copyUntil($string) {
        $newPosition = $this->find($string);
        $this->compressedCode .= substr($this->code, $this->currentPosition, $newPosition - $this->currentPosition);
        $this->currentPosition = $newPosition;
    }
252758
public function write($string)
    {
        $string = $this->parseTags($string);

        $this->enableClearLine();

        echo $string;
        return $this;
    }
95584
public function write($string)
    {
        $converted = $this->converter->convert($string, $this->stringCharset, $this->streamCharset);
        $written = $this->converter->getLength($converted, $this->streamCharset);
        $this->position += $written;
        return $this->stream->write($converted);
    }
369935
public function setString($string = '')
    {
        try {
            Assert::string($string);
        } catch (InvalidArgumentException $e) {
            $this->string = '';
        }

        $this->string = $string;

        return $this;
    }
609130
public static function fromString($string)
    {
        $stream = fopen('php://temp', 'r+');
        if ($string !== '') {
            fwrite($stream, $string);
            rewind($stream);
        }

        return new static($stream);
    }
801842
public function insert( $position, $string )
	{
		if( $position<= $this->count() && $position >=0 )
		{
			if( $position < $this->pointer )
				$this->pointer = $this->pointer + strlen( $string );
			$left	= substr( $this->toString(), 0, $position );
			$right	= substr( $this->toString(), $position );
			$this->buffer = $left.$string.$right;
		}
		return $this->toString();
	}
242995
public function append(string $string) {
        for ($i = 0; $i < \strlen($string); $i++) {
            $this->arrayList->add($string[$i]);
        }
    }
574705
public function lastIndexOf($string, int $offset = 0): int
    {
        Assert::typeOf(['string', __CLASS__], $string);
        $pos = mb_strrpos($this->data, (string) $string, $offset, $this->encoding);

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

        return $this;
    }
1312620
public static void copy(String str, char[] buffer, int offset) {
		str.getChars(0, str.length(), buffer, offset);
	}
496382
public void set(String string) {
        try {
            ByteBuffer bb = encode(string, true);
            bytes = bb.array();
            length = bb.limit();
        } catch (CharacterCodingException e) {
            throw new RuntimeException("Should not have happened " + e.toString());
        }
    }
1122078
public function compress( $string, $oneLine = FALSE ){
		$this->statistics	= array();
		$this->statistics['before']	= strlen( $string );
		$string	= self::compressString( $string, $oneLine );
		$this->statistics['after']	= strlen( $string );
		return $string;
	}
133874
private static function _uncompressByteString($string)
	{
		$uncompressedString = '';
		$strLen = strlen($string);
		for ($i = 0; $i < $strLen; ++$i) {
			$uncompressedString .= $string[$i] . "\0";
		}

		return $uncompressedString;
	}
500773
public function prependF ($string)
	{
		ensure('Argument', $string, 'is_a_string', __CLASS__, __METHOD__);

		if ($string instanceof self) {
			$string = $string->to_s();
		}

		$this->string = $string . $this->string;

		return $this;
	}
52253
public function compareStart($string)
    {
        $lowerString = strtolower($string);
        foreach ($this->tokens as $token) {
            if (strpos($lowerString, strtolower($token)) === 0) {
                $this->found = true;
            }
        }
    }
533023
public function prepend($str)
    {
        $this->buffer = $str . \substr($this->buffer, $this->bufferPos);
        $this->bufferPos = 0;
    }
278260
public function setInfo($string) {
    $this->info = $string;
    $this->message = sprintf($this->newMessage,
                             $this->item, $this->info, $this->dependency);
  }