Simplify end of string char checks.