define(function(require, exports, module) {
    "use strict";
   
/*
 * Casts the first character in a string to uppercase.
 *
 * @param {String} str
 * @type {String}
 */
exports.uCaseFirst = function(str) {
    return str.substr(0, 1).toUpperCase() + str.substr(1);
};

/*
 * Removes spaces and other space-like characters from the left and right ends
 * of a string
 *
 * @param {String} str
 * @type {String}
 */
exports.trim = function(str) {
    return str.replace(/[\s\n\r]*$/, "").replace(/^[\s\n\r]*/, "");
};

/*
 * Concatenate a string with itself n-times.
 *
 * @param {String} str
 * @param {Number} times Number of times to repeat the String concatenation
 * @type  {String}
 */
exports.repeat = function(str, times) {
    return new Array(times + 1).join(str);
};

/*
 * Count the number of occurences of substring 'str' inside a string
 *
 * @param {String} str
 * @param {String} substr
 * @type  {Number}
 */
exports.count = function(str, substr){
    return str.split(substr).length - 1;
};
 
});
@@ -1002,14 +1002,428 @@
  - 1;%0A%7D;
+%0A%0Aexports.endsWith = function(subjectString, searchString, position) %7B%0A    if (typeof position !== 'number' %7C%7C !isFinite(position) %7C%7C Math.floor(position) !== position %7C%7C position %3E subjectString.length) %7B%0A        position = subjectString.length;%0A    %7D%0A    position -= searchString.length;%0A    var lastIndex = subjectString.indexOf(searchString, position);%0A    return lastIndex !== -1 && lastIndex === position;%0A%7D;
 %0A %0A%7D);

secure redirect