original_string: public function countSubstring($substring, $caseSensitive = true) {
  		$this->verifyNotEmpty($substring, '$substring');
  		if ($caseSensitive) {
  			return mb_substr_count($this->string, $substring, $this->encoding);
  		}
  		$str = mb_strtoupper($this->string, $this->encoding);
  		$substring = mb_strtoupper($substring, $this->encoding);
  		return mb_substr_count($str, $substring, $this->encoding);
  	}
code: public function countSubstring($substring, $caseSensitive = true) {
  		$this->verifyNotEmpty($substring, '$substring');
  		if ($caseSensitive) {
  			return mb_substr_count($this->string, $substring, $this->encoding);
  		}
  		$str = mb_strtoupper($this->string, $this->encoding);
  		$substring = mb_strtoupper($substring, $this->encoding);
  		return mb_substr_count($str, $substring, $this->encoding);
  	}
code_tokens: public function countSubstring ( $ substring , $ caseSensitive = true ) { $ this -> verifyNotEmpty ( $ substring , '$substring' ) ; if ( $ caseSensitive ) { return mb_substr_count ( $ this -> string , $ substring , $ this -> encoding ) ; } $ str = mb_strtoupper ( $ this -> string , $ this -> encoding ) ; $ substring = mb_strtoupper ( $ substring , $ this -> encoding ) ; return mb_substr_count ( $ str , $ substring , $ this -> encoding ) ; }
docstring: Count the number of substring occurrences.
  
  @param string|Text $substring The substring to count the occurrencies
  @param boolean $caseSensitive Force case-sensitivity
  @return int
docstring_tokens: Count the number of substring occurrences .