Here you can find the source of endWith(endStr)
function ConvertJSONDateToJSDate(jsondate) { var date = new Date(parseInt(jsondate.replace("/Date(", "").replace(")/", ""), 10)); return date;//from w ww . j av a2 s . c om } //yyyy-MM-dd function getDate(date) { var year = date.getFullYear(); var month = date.getMonth() + 1; var day = date.getDate(); return year + "-" + month + "-" + day; } //yyyy-MM-dd HH:mm:SS function getDateTime(date) { var year = date.getFullYear(); var month = date.getMonth() + 1; var day = date.getDate(); var hh = date.getHours(); var mm = date.getMinutes(); var ss = date.getSeconds(); return year + "-" + month + "-" + day + " " + hh + ":" + mm + ":" + ss; } String.prototype.endWith = function (endStr) { var d = this.length - endStr.length; return (d >= 0 && this.lastIndexOf(endStr) == d) }
String.prototype.EndsWith = function( str ) return this.lastIndexOf( str ) == this.length - str.length; };
String.prototype.endWith = function (endStr) { var lastIndex = this.length - endStr.length; return (lastIndex > 0 && this.lastIndexOf(endStr) == lastIndex); };
String.prototype.ends = function( other ){ if( !other )return false var endlen = this.length var otherlen = other.length if( !endlen || endlen > otherlen ){ return false } return other.substr( 0, otherlen - endlen) + this == other function str_ends( that, other ){ if( !other )return false ...
jCube.String.endsWith = String.prototype.endsWith = function( keyword, ignoreCase) { var _string = this; if ( ignoreCase == true ) { _string = _string.toLowerCase(); keyword = keyword.toLowerCase(); return _string.substring( _string.length-keyword.length) == keyword;
String.prototype.endsWith = function( str ) { if( str.length > this.length ) { return false; return( String( this ).substr( this.length - str.length, this.length ) == str ); };
String.prototype.endsWith = function( value, ignoreCase ) var L1 = this.length ; var L2 = value.length ; if ( L2 > L1 ) return false ; if ( ignoreCase ) var oRegex = new RegExp( value + '$' , 'i' ) ; ...