original_string: public function startsWith(self $str, MStringComparison $cmp = null){
  		
  		if($str->isNullOrEmpty()){
  			throw new \InvalidArgumentException('$str is empty');
  		}
  		
  		if($str->count() > $this->count()){
  			throw new \InvalidArgumentException('$str is longer than $this');
  		}
  		
  		if($cmp === null || $cmp->getValue() === MStringComparison::CASE_SENSITIVE){
  			return $this->substring(0, $str->count())->_Value === $str->_Value;
  		}
  		else{
  			return $this->substring(0, $str->count())->toLower()
  					->_Value === $str->toLower()->_Value;
  		}
  		
  	}
code: public function startsWith(self $str, MStringComparison $cmp = null){
  		
  		if($str->isNullOrEmpty()){
  			throw new \InvalidArgumentException('$str is empty');
  		}
  		
  		if($str->count() > $this->count()){
  			throw new \InvalidArgumentException('$str is longer than $this');
  		}
  		
  		if($cmp === null || $cmp->getValue() === MStringComparison::CASE_SENSITIVE){
  			return $this->substring(0, $str->count())->_Value === $str->_Value;
  		}
  		else{
  			return $this->substring(0, $str->count())->toLower()
  					->_Value === $str->toLower()->_Value;
  		}
  		
  	}
code_tokens: public function startsWith ( self $ str , MStringComparison $ cmp = null ) { if ( $ str -> isNullOrEmpty ( ) ) { throw new \ InvalidArgumentException ( '$str is empty' ) ; } if ( $ str -> count ( ) > $ this -> count ( ) ) { throw new \ InvalidArgumentException ( '$str is longer than $this' ) ; } if ( $ cmp === null || $ cmp -> getValue ( ) === MStringComparison :: CASE_SENSITIVE ) { return $ this -> substring ( 0 , $ str -> count ( ) ) -> _Value === $ str -> _Value ; } else { return $ this -> substring ( 0 , $ str -> count ( ) ) -> toLower ( ) -> _Value === $ str -> toLower ( ) -> _Value ; } }
docstring: Whether this string starts with a given string
  @link http://stackoverflow.com/a/3282864/570787
  @param self $str
  @param MStringComparison $cmp optional comparision option, default is null (case sensitive)
  @return bool
docstring_tokens: Whether this string starts with a given string