From 01b0e12ba27b5069248fd09235e9a7143915ee30 Mon Sep 17 00:00:00 2001 From: Irvin Date: Wed, 16 Feb 2022 02:02:49 +0800 Subject: remove `notranslate` class in zh-CN --- .../reference/global_objects/string/charcodeat/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'files/zh-cn/web/javascript/reference/global_objects/string/charcodeat') diff --git a/files/zh-cn/web/javascript/reference/global_objects/string/charcodeat/index.html b/files/zh-cn/web/javascript/reference/global_objects/string/charcodeat/index.html index 8c683db768..e0c7b1168f 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/string/charcodeat/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/string/charcodeat/index.html @@ -22,7 +22,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/charCodeAt

语法

-
str.charCodeAt(index)
+
str.charCodeAt(index)

参数

@@ -55,7 +55,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/charCodeAt

下例介绍了不同索引情况下返回的 Unicode 值:

-
"ABC".charCodeAt(0) // returns 65:"A"
+
"ABC".charCodeAt(0) // returns 65:"A"
 
 "ABC".charCodeAt(1) // returns 66:"B"
 
@@ -67,7 +67,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/charCodeAt
 
 

这段代码可以被用在 for 循环和其他类似语句中,当在指定引索之前不确定是否有非BMP字符存在时。

-
function fixedCharCodeAt (str, idx) {
+
function fixedCharCodeAt (str, idx) {
     // ex. fixedCharCodeAt ('\uD800\uDC00', 0); // 65536
     // ex. fixedCharCodeAt ('\uD800\uDC00', 1); // false
     idx = idx || 0;
@@ -98,7 +98,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/String/charCodeAt
 
 

使用 charCodeAt() 修复字符串中出现的已知的非BMP字符

-
function knownCharCodeAt (str, idx) {
+
function knownCharCodeAt (str, idx) {
     str += '';
     var code,
         end = str.length;
-- 
cgit v1.2.3-54-g00ecf