From f00f770a0230fe88e647da0407884d08933dbf33 Mon Sep 17 00:00:00 2001 From: Masahiro FUJIMOTO Date: Thu, 10 Oct 2024 23:43:46 +0900 Subject: [PATCH] =?UTF-8?q?2023/08/25=20=E6=99=82=E7=82=B9=E3=81=AE?= =?UTF-8?q?=E8=8B=B1=E8=AA=9E=E7=89=88=E3=81=AB=E5=9F=BA=E3=81=A5=E3=81=8D?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../global_objects/string/iswellformed/index.md | 10 +++++++--- .../global_objects/string/towellformed/index.md | 10 +++++++--- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/files/ja/web/javascript/reference/global_objects/string/iswellformed/index.md b/files/ja/web/javascript/reference/global_objects/string/iswellformed/index.md index d2b2a6ac1868ad..9624019bd1fa92 100644 --- a/files/ja/web/javascript/reference/global_objects/string/iswellformed/index.md +++ b/files/ja/web/javascript/reference/global_objects/string/iswellformed/index.md @@ -2,7 +2,7 @@ title: String.prototype.isWellFormed() slug: Web/JavaScript/Reference/Global_Objects/String/isWellFormed l10n: - sourceCommit: 5635446aa0127d686183ddd4fd5adcc34be567da + sourceCommit: 27180875516cc311342e74b596bfb589b7211e0c --- {{JSRef}} @@ -15,6 +15,10 @@ l10n: isWellFormed() ``` +### 引数 + +なし。 + ### 返値 この文字列に孤立サロゲートがある場合は `true`、そうでなれば `false`。 @@ -31,10 +35,10 @@ JavaScript の文字列は UTF-16 エンコードです。UTF-16 エンコーデ ```js const strings = [ - // 孤立高サロゲート + // 孤立上位サロゲート "ab\uD800", "ab\uD800c", - // 孤立低サロゲート + // 孤立下位サロゲート "\uDFFFab", "c\uDFFFab", // 整形式 diff --git a/files/ja/web/javascript/reference/global_objects/string/towellformed/index.md b/files/ja/web/javascript/reference/global_objects/string/towellformed/index.md index 346713ef71fdcd..efaccc1467b41b 100644 --- a/files/ja/web/javascript/reference/global_objects/string/towellformed/index.md +++ b/files/ja/web/javascript/reference/global_objects/string/towellformed/index.md @@ -2,7 +2,7 @@ title: String.prototype.toWellFormed() slug: Web/JavaScript/Reference/Global_Objects/String/toWellFormed l10n: - sourceCommit: 5635446aa0127d686183ddd4fd5adcc34be567da + sourceCommit: 27180875516cc311342e74b596bfb589b7211e0c --- {{JSRef}} @@ -15,6 +15,10 @@ l10n: toWellFormed() ``` +### 引数 + +なし。 + ### 返値 この文字列のコピーで、孤立サロゲートをすべて Unicode 置換文字 U+FFFD に置き換えた新しい文字列です。 もし `str` が[整形式](/ja/docs/Web/JavaScript/Reference/Global_Objects/String/isWellFormed) であれば、やはり新しい文字列が返されます(基本的には `str` のコピーです)。 @@ -33,10 +37,10 @@ JavaScript の文字列は UTF-16 でエンコードされています。UTF-16 ```js const strings = [ - // 孤立高サロゲート + // 孤立上位サロゲート "ab\uD800", "ab\uD800c", - // 孤立低サロゲート + // 孤立下位サロゲート "\uDFFFab", "c\uDFFFab", // 整形式