﻿// String.js
// a library to extend the built-in string functionality

// common Util object; include this line in each library class
var Util = Util ? Util : {};
Util.String = {};


// StartsWith
//
// Description
// returns whether or not the supplied string starts with a specified substring
//
// Args
// string [string] : the source string
// startsWith [string] : the substring

Util.String.StartsWith = function (string, startsWith)
{
	return string.length > startsWith.length &&
		string.substr(0, startsWith.length) == startsWith;
};


