Alex Rivera | Logout

JavaScript or jQuery string ends with utility function

Asked 2009-07-07T22:27:18.240
76

what is the easiest way to figure out if a string ends with a certain value?

Edit
Report

1 Answer

9

Regular expressions

"Hello world".match(/world$/)
answered 2009-07-07T22:32:04.753

Your Answer