Avoid un-necessary decode in startsWith/endsWith

As requested in #2503.

Perhaps it's overkill?
Why? What's wrong with comparing a dchar with an integral?