﻿//----------------------------------------------------
// List of util javascript functions
//----------------------------------------------------

// adds trim method to string variables
String.prototype.trim = function()
{
    return this.replace(/^\s+|\s+$/g, "");
}

String.prototype.startsWith = function(str)
{
    return (this.match("^" + str) == str);
}

String.prototype.endsWith = function(str)
{
    return (this.match(str + "$") == str);
}