Beispiel #1
0
 /**
 		Finds and returns the range of the firt occurrence of a given string within
 		the receiver.
 		\param $aString
 		\returns RTRange
 */
 public function rangeOfString(RTString $aString)
 {
     $pos = strpos($this->description(), $aString->description());
     if ($pos === FALSE) {
         return RTMakeRange(0, 0);
     }
     return RTMakeRange($pos, $aString->length());
 }