remove temp variable in Strings::endsWith, use mb_substr() instead of substr()