code: function endsWith(longStr, shortStr) {
  		var longLen = longStr.length, shortLen = shortStr.length;
  		return (longLen >= shortLen) &&
  			(longStr.substr(longLen - shortLen) === shortStr);
  	}
docs: Private functions