original_string: public function substring($start, $end = null) {
  		$length = $this->length();
  		if ($end < 0) {
  			$end = $length + $end;
  		}
  		$end = $end !== null ? min($end, $length) : $length;
  		$start = min($start, $end);
  		$end = max($start, $end);
  		$end = $end - $start;
  
  		return new Text(mb_substr($this->string, $start, $end, $this->encoding), $this->encoding);
  	}
code: public function substring($start, $end = null) {
  		$length = $this->length();
  		if ($end < 0) {
  			$end = $length + $end;
  		}
  		$end = $end !== null ? min($end, $length) : $length;
  		$start = min($start, $end);
  		$end = max($start, $end);
  		$end = $end - $start;
  
  		return new Text(mb_substr($this->string, $start, $end, $this->encoding), $this->encoding);
  	}
code_tokens: public function substring ( $ start , $ end = null ) { $ length = $ this -> length ( ) ; if ( $ end < 0 ) { $ end = $ length + $ end ; } $ end = $ end !== null ? min ( $ end , $ length ) : $ length ; $ start = min ( $ start , $ end ) ; $ end = max ( $ start , $ end ) ; $ end = $ end - $ start ; return new Text ( mb_substr ( $ this -> string , $ start , $ end , $ this -> encoding ) , $ this -> encoding ) ; }
docstring: Slices a piece of the string from a given start to an end.
  If no length is given, the String is sliced to its maximum length.
  
  @see #slice
  @param int $start
  @param int $end
  @return Text
docstring_tokens: Slices a piece of the string from a given start to an end . If no length is given the String is sliced to its maximum length .