﻿String.prototype.endsWith=function(a,b){if(b){var d=this.length-a.length;return d>=0&&this.lastIndexOf(a)===d}else{var s=this.toLowerCase();a=a.toLowerCase();var d=s.length-a.length;return d>=0&&s.lastIndexOf(a)===d}};String.prototype.startsWith=function(a,b){if(b){var c=a.length;return(this.substring(0,c)==a)}else{var s=this.toLowerCase();a=a.toLowerCase();var c=a.length;return(s.substring(0,c)==a)}};String.prototype.contains=function(a,b){var c=this;if(b==undefined||b==false){c=c.toLowerCase();a=a.toLowerCase()}if(c.search(a)<0)return false;else return true};
