diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 21:46:22 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 21:46:22 -0500 |
commit | a065e04d529da1d847b5062a12c46d916408bf32 (patch) | |
tree | fe0f8bcec1ff39a3c499a2708222dcf15224ff70 /files/ja/web/javascript/reference/global_objects/string/quote/index.html | |
parent | 218934fa2ed1c702a6d3923d2aa2cc6b43c48684 (diff) | |
download | translated-content-a065e04d529da1d847b5062a12c46d916408bf32.tar.gz translated-content-a065e04d529da1d847b5062a12c46d916408bf32.tar.bz2 translated-content-a065e04d529da1d847b5062a12c46d916408bf32.zip |
update based on https://github.com/mdn/yari/issues/2028
Diffstat (limited to 'files/ja/web/javascript/reference/global_objects/string/quote/index.html')
-rw-r--r-- | files/ja/web/javascript/reference/global_objects/string/quote/index.html | 75 |
1 files changed, 0 insertions, 75 deletions
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 ---- -<div>{{JSRef}} {{obsolete_header("37")}} {{non-standard_header}}</div> - -<p>特殊文字をエスケープシーケンスで置換しダブル・クォーテーション(<code>"</code>)でラップした文字列のコピーを返します。</p> - -<h2 id="Syntax" name="Syntax">構文</h2> - -<pre class="syntaxbox"><code><em>str</em>.quote()</code></pre> - -<h3 id="Return_value">Return value</h3> - -<p>A new string representing the original string wrapped in double-quotes, with any special characters escaped.</p> - -<h2 id="Examples" name="Examples">例</h2> - -<p>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.</p> - -<table class="fullwidth-table" style="width: 100%;"> - <thead> - <tr> - <th class="header" scope="col"><code>str</code></th> - <th class="header" scope="col"><code>str.quote()</code></th> - <th class="header" scope="col"><code><a href="/ja/docs/JavaScript/Reference/Global_Objects/eval" title="JavaScript/Reference/Global_Objects/eval">eval</a>( str.quote() )</code></th> - </tr> - </thead> - <tbody> - <tr> - <td><code>Hello world!</code></td> - <td><code>"Hello world!"</code></td> - <td><code>Hello world!</code></td> - </tr> - <tr> - <td><code>Hello<br> - world!</code></td> - <td><code>"Hello\n\tworld!"</code></td> - <td><code>Hello<br> - world!</code></td> - </tr> - <tr> - <td><code>" \ — '</code></td> - <td><code>"\" \\ \u2014 '"</code></td> - <td><code>" \ — '</code></td> - </tr> - </tbody> -</table> - -<h2 id="仕様">仕様</h2> - -<p>Not part of any standard. Implemented in JavaScript 1.3.</p> - -<h2 id="ポリフィル">ポリフィル</h2> - -<pre class="syntaxbox"><code>if (!String.prototype.quote) - String.prototype.quote = function(){ - return JSON.stringify( this ); // since IE8 -</code> }</pre> - -<h2 id="ブラウザ互換性情報">ブラウザ互換性情報</h2> - -<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> - -<p>{{Compat("javascript.builtins.String.quote")}}</p> - -<h2 id="関連情報">関連情報</h2> - -<ul> - <li>{{jsxref("JSON.stringify()")}}</li> -</ul> |