From a065e04d529da1d847b5062a12c46d916408bf32 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 21:46:22 -0500 Subject: update based on https://github.com/mdn/yari/issues/2028 --- .../global_objects/string/quote/index.html | 75 ---------------------- 1 file changed, 75 deletions(-) delete mode 100644 files/ja/web/javascript/reference/global_objects/string/quote/index.html (limited to 'files/ja/web/javascript/reference/global_objects/string') diff --git a/files/ja/web/javascript/reference/global_objects/string/quote/index.html b/files/ja/web/javascript/reference/global_objects/string/quote/index.html deleted file mode 100644 index 2a074faf32..0000000000 --- a/files/ja/web/javascript/reference/global_objects/string/quote/index.html +++ /dev/null @@ -1,75 +0,0 @@ ---- -title: String.prototype.quote() -slug: Web/JavaScript/Reference/Global_Objects/String/quote -tags: - - String - - String Methods -translation_of: Archive/Web/JavaScript/String.quote ---- -
{{JSRef}} {{obsolete_header("37")}} {{non-standard_header}}
- -

特殊文字をエスケープシーケンスで置換しダブル・クォーテーション(")でラップした文字列のコピーを返します。

- -

構文

- -
str.quote()
- -

Return value

- -

A new string representing the original string wrapped in double-quotes, with any special characters escaped.

- -

- -

In the table below thequote()method replaces any special characters and wraps the strings in double-quotes. Also note the third column where a wrapped {{jsxref("Global_Objects/eval", "eval()")}} evaluates the escape sequences again.

- - - - - - - - - - - - - - - - - - - - - - - - - - -
strstr.quote()eval( str.quote() )
Hello world!"Hello world!"Hello world!
Hello
-         world!
"Hello\n\tworld!"Hello
-         world!
" \ — '"\" \\ \u2014 '"" \ — '
- -

仕様

- -

Not part of any standard. Implemented in JavaScript 1.3.

- -

ポリフィル

- -
if (!String.prototype.quote)
-    String.prototype.quote = function(){
-        return JSON.stringify( this ); // since IE8
-    }
- -

ブラウザ互換性情報

- - - -

{{Compat("javascript.builtins.String.quote")}}

- -

関連情報

- - -- cgit v1.2.3-54-g00ecf