String.prototype.EndWith = function (str) { (str == null || str == "" || this.length == 0 || str.length > this.length)
return false;
return false;
if (this.subthing . ) .length) == str)
return true;
else
return false;
包含str) {
if (str == null || str == "" || this.length == 0 || str.length > this.length)
return false;
return false; return false; 返回true;
else
回復🎜> 返回此.replace(/(^s*)|(s*$)/g, "");
}
String.prototype.ltrim = function () {
return this.replace(/ ( ^ s*)/g, "");
}
String.prototype.rtrim = function () {
return this.replace(/(s*$)/g, "");
}
String.format = function (str) {
var i = 1, args = 參數;
var str = args[0];
var str = args[0];
}/g;
return str.replace(re, function () { return args[i ] });
};
var Json2string = function (obj) {
obj);
if (t != "object" || obj === null) {
if (t == "string") obj = "'" obj " '";
// 鄰近物件
函數== Array);
為 (n in obj) {
t = typeof (v);
if (t == "string") v = "'" v " (t == "object" && v !== null)
v = Json2string(v);
v));
}
: "{") String(json) (arr ? "]" : "}");
}
};