code: public function startsWith($pattern)
      {
          return (substr($this->string, 0, strlen($pattern)) == $pattern) ? true : false;
      }
docs: Returns true if the string starts with $pattern.
  
  @param  string $pattern
  @return boolean