﻿String.prototype.startsWith = function(fragment) {
	var pos = this.indexOf(fragment);
	return (pos == 0);
}

String.prototype.endsWith = function(fragment) {
	// should be last index of
	var pos = this.indexOf(fragment);
	var expectedPos = this.length - fragment.length;
	return (pos == expectedPos);
}

String.prototype.contains = function(fragment) {
	var pos = this.indexOf(fragment);
	return (pos != -1);	
}

