From f45e9e070c93ebbd83d488bdd775987a4d75c201 Mon Sep 17 00:00:00 2001 From: t7yang Date: Mon, 10 Jan 2022 08:38:08 +0800 Subject: fix yari h2m dry run errors --- .../reference/global_objects/string/index.html | 10 ++-- .../global_objects/string/padstart/index.html | 58 ++-------------------- .../global_objects/string/replace/index.html | 16 +++--- 3 files changed, 17 insertions(+), 67 deletions(-) (limited to 'files/zh-tw/web/javascript/reference/global_objects/string') diff --git a/files/zh-tw/web/javascript/reference/global_objects/string/index.html b/files/zh-tw/web/javascript/reference/global_objects/string/index.html index e29b6b8cea..2c9e419b04 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/string/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/string/index.html @@ -105,8 +105,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String
-
-

和其他語言不同,JavaScript 將單引號字串和雙引號字串是做相同;因此,上述的序列可以在單引號或雙引號中作用。

+
+

備註:和其他語言不同,JavaScript 將單引號字串和雙引號字串是做相同;因此,上述的序列可以在單引號或雙引號中作用。

@@ -192,7 +192,7 @@ console.log(eval(s2)); // 回傳字串 "2 + 2"
console.log(eval(s2.valueOf())); // 回傳數字 4
 
-
注意: 對於在 JavaScript 中其他可用的字串方法,請參閱這篇文章StringView – a C-like representation of strings based on typed arrays
+

備註:對於在 JavaScript 中其他可用的字串方法,請參閱這篇文章StringView – a C-like representation of strings based on typed arrays

屬性

@@ -216,8 +216,8 @@ console.log(eval(s2)); // 回傳字串 "2 + 2"

String 通用方法

-
-

字串通用方法是非標準化的、被棄用的,也有近期將被刪除的。

+
+

警告:字串通用方法是非標準化的、被棄用的,也有近期將被刪除的。

The String instance methods are also available in Firefox as of JavaScript 1.6 (though not part of the ECMAScript standard) on the String object for applying String methods to any object:

diff --git a/files/zh-tw/web/javascript/reference/global_objects/string/padstart/index.html b/files/zh-tw/web/javascript/reference/global_objects/string/padstart/index.html index bb053cd10a..e61013fb77 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/string/padstart/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/string/padstart/index.html @@ -31,63 +31,13 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/padStart 'abc'.padStart(6,"123465"); // "123abc" -

Specifications

+

規範

-

這個方法還沒有被納入 ECMAScript 標準。現在還只是個提案

+{{Specifications}} -

Browser compatibility

+

瀏覽器相容性

-
{{CompatibilityTable}}
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support{{CompatChrome(57)}} 15{{CompatGeckoDesktop(51)}}{{CompatNo}}{{CompatOpera(44)}}{{CompatSafari(10)}}
-
- -
- - - - - - - - - - - - - - - - - - - - - -
FeatureAndroidChrome for AndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic support{{CompatUnknown}}{{CompatChrome(57)}}{{CompatGeckoMobile(51)}}{{CompatUnknown}}{{CompatUnknown}}{{CompatSafari(10)}}
-
+{{Compat}}

See also

diff --git a/files/zh-tw/web/javascript/reference/global_objects/string/replace/index.html b/files/zh-tw/web/javascript/reference/global_objects/string/replace/index.html index 1cc9b1abac..b40013644c 100644 --- a/files/zh-tw/web/javascript/reference/global_objects/string/replace/index.html +++ b/files/zh-tw/web/javascript/reference/global_objects/string/replace/index.html @@ -7,8 +7,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/replace

replace() 方法會傳回一個新字串,此新字串是透過將原字串與 pattern 比對,以 replacement 取代吻合處而生成。pattern 可以是字串或 {{jsxref("RegExp")}},而 replacement 可以是字串或函式(會在每一次匹配時被呼叫)。

-
-

備註:原始的字串會保持不變。

+
+

備註:原始的字串會保持不變。

語法

@@ -42,11 +42,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/replace

The replacement string can include the following special replacement patterns:

- +
- - + + @@ -77,11 +77,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/replace

The arguments to the function are as follows:

-
PatternInsertsPatternInserts
$$
+
- - + + -- cgit v1.2.3-54-g00ecf
Possible nameSupplied valuePossible nameSupplied value
match