// 先頭の空白を削除
String.prototype.ltrim = function() {
  return this.replace(/^\s+/, "");
}
// 末尾の空白を削除
String.prototype.rtrim = function() {
  return this.replace(/\s+$/, "");
}
// 先頭および末尾の空白を削除
String.prototype.trim = function() {
  return this.replace(/^\s+|\s+$/g, "");
}
String.prototype.reverse = function() {
	var result = "";
	for (var i=(this.length-1) ; i>=0 ; i--) {
		result += this.substr(i, 1);
	}
	return result;
}
String.prototype.escapeQuote = function() {
	return this.replace(/\\/g, "\\\\").replace(/\"/g, "\\\"");
}

