public function endsWith($endsWith, $caseSensitive = false)
    {
        if (! $caseSensitive) {
            return strtolower($this->last()) === strtolower($endsWith);
        }

        return $this->last() === $endsWith;
    }
public function endsWith($endsWith, $caseSensitive = false)
    {
        if (! $caseSensitive) {
            return strtolower($this->last()) === strtolower($endsWith);
        }

        return $this->last() === $endsWith;
    }
public function endsWith ( $ endsWith , $ caseSensitive = false ) { if ( ! $ caseSensitive ) { return strtolower ( $ this -> last ( ) ) === strtolower ( $ endsWith ) ; } return $ this -> last ( ) === $ endsWith ; }
Determine if the identifier ends with the specified part string

@param string $endsWith      The string that the last part should equal
@param bool   $caseSensitive Perform a case-sensitive comparison.
Defaults to FALSE

@return bool True if the last identifier part equals the specified
string
Determine if the identifier ends with the specified part string