Created
March 6, 2017 21:31
-
-
Save morbidcamel101/8902be532d46947cf0c00a4268dc4500 to your computer and use it in GitHub Desktop.
End with string extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String.prototype.endsWith = function(suffix) { | |
return this.indexOf(suffix, this.length - suffix.length) !== -1; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment