original_string: public function endsWith($needle, $caseSensitive = null)
      {
          if ('' === $needle) {
              return true;
          }
          if (null === $caseSensitive) {
              $caseSensitive = false;
          }
  
          $end = mb_substr($this->string(), -mb_strlen($needle));
  
          if ($caseSensitive) {
              return $end === $needle;
          }
  
          return mb_strtolower($end) === mb_strtolower($needle);
      }
code: public function endsWith($needle, $caseSensitive = null)
      {
          if ('' === $needle) {
              return true;
          }
          if (null === $caseSensitive) {
              $caseSensitive = false;
          }
  
          $end = mb_substr($this->string(), -mb_strlen($needle));
  
          if ($caseSensitive) {
              return $end === $needle;
          }
  
          return mb_strtolower($end) === mb_strtolower($needle);
      }
code_tokens: public function endsWith ( $ needle , $ caseSensitive = null ) { if ( '' === $ needle ) { return true ; } if ( null === $ caseSensitive ) { $ caseSensitive = false ; } $ end = mb_substr ( $ this -> string ( ) , - mb_strlen ( $ needle ) ) ; if ( $ caseSensitive ) { return $ end === $ needle ; } return mb_strtolower ( $ end ) === mb_strtolower ( $ needle ) ; }
docstring: Determine if this path ends with a substring.
  
  @param string       $needle        The substring to search for.
  @param boolean|null $caseSensitive True if case sensitive.
  
  @return boolean True if this path ends with the substring.
docstring_tokens: Determine if this path ends with a substring .