original_string: public function splice($replacement, $offset, $length = null) {
  		$offset = $this->prepareOffset($offset);
  		$length = $this->prepareLength($offset, $length);
  
  		$start = $this->substring(0, $offset);
  		$end = $this->substring($offset + $length);
  
  		return new Text($start . $replacement . $end);
  	}
code: public function splice($replacement, $offset, $length = null) {
  		$offset = $this->prepareOffset($offset);
  		$length = $this->prepareLength($offset, $length);
  
  		$start = $this->substring(0, $offset);
  		$end = $this->substring($offset + $length);
  
  		return new Text($start . $replacement . $end);
  	}
code_tokens: public function splice ( $ replacement , $ offset , $ length = null ) { $ offset = $ this -> prepareOffset ( $ offset ) ; $ length = $ this -> prepareLength ( $ offset , $ length ) ; $ start = $ this -> substring ( 0 , $ offset ) ; $ end = $ this -> substring ( $ offset + $ length ) ; return new Text ( $ start . $ replacement . $ end ) ; }
docstring: Replace text within a portion of a string.
  
  @param string|Text $replacement
  @param int $offset
  @param int|null $length
  @return Text
  @throws \InvalidArgumentException If $offset is greater then the string length or $length is too small.
docstring_tokens: Replace text within a portion of a string .