src/Koldy/Util.php
public static function endsWith(string $yourString, string $endsWith, string $encoding = null): bool
    {
        return mb_substr($yourString, 0 - mb_strlen($endsWith, $encoding ?? Application::getEncoding()), null, $encoding ?? Application::getEncoding()) === $endsWith;
    }
public static function endsWith(string $yourString, string $endsWith, string $encoding = null): bool
    {
        return mb_substr($yourString, 0 - mb_strlen($endsWith, $encoding ?? Application::getEncoding()), null, $encoding ?? Application::getEncoding()) === $endsWith;
    }
public static function endsWith ( string $ yourString , string $ endsWith , string $ encoding = null ) : bool { return mb_substr ( $ yourString , 0 - mb_strlen ( $ endsWith , $ encoding ?? Application :: getEncoding ( ) ) , null , $ encoding ?? Application :: getEncoding ( ) ) === $ endsWith ; }
Check if string ends with given string - it supports UTF-8, but it's case sensitive

@param string $yourString
@param string $endsWith
@param string|null $encoding - by default, using application config (encoding) or uses UTF-8 by default

@return bool
@throws Exception
Check if string ends with given string - it supports UTF - 8 but it s case sensitive