ICE-9953 Fix endsWith function by making sure the pattern searched in the string is actually found in it before testing that its position is at the end.

git-svn-id: http://anonsvn.icesoft.org/repo/bridge-support/trunk@41509 8668f098-c06c-11db-ba21-f49e70c34f74