-function errorDisplay(error){
- var out = '<div class="error"><dl id="system-message"><dt class="error">Notice</dt><dd class="error message"><ul><li>' + error + '</li></ul></dd></dl></div>';
- return out;
-}
+// Adding startsWith & endsWith to the string prototype
+if ( typeof String.prototype.startsWith != 'function' ) {
+ String.prototype.startsWith = function( str ) {
+ return this.substring( 0, str.length ) === str;
+ }
+};
+
+if ( typeof String.prototype.endsWith != 'function' ) {
+ String.prototype.endsWith = function( str ) {
+ return this.substring( this.length - str.length, this.length ) === str;
+ }
+};
+// http://stackoverflow.com/questions/646628/javascript-startswith