Added a function endsWith so that the code is more readable
Merge pull request #2 from sixro/ends-with

Added a function endsWith so that the code is more readable