scripts/menu.js
/**
 * Check whether a string ends with a specified substring
 * @param {String} str The string to check the end of
 * @param {String} endTxt The substring to check for
 */
Check whether a string ends with a specified substring
@param {String} str The string to check the end of
@param {String} endTxt The substring to check for
Check whether a string ends with a specified substring @param { String } str The string to check the end of @param { String } endTxt The substring to check for
function checkStringEndText(str, endTxt) {
    var regexObj = new RegExp(endTxt + "$"); 
    return regexObj.test(str);
}
function checkStringEndText ( str , endTxt ) { var regexObj = new RegExp ( endTxt + "$" ) ; return regexObj . test ( str ) ; }
Check whether a string ends with a specified substring
 @param {String} str The string to check the end of
 @param {String} endTxt The substring to check for
Check whether a string ends with a specified substring @param { String } str The string to check the end of @param { String } endTxt The substring to check for
//In Regular Expressions, $ means "the end of the string"