Skip to content

Commit 71f72aa

Browse files
authored
Update article.md finish
1 parent e8da61f commit 71f72aa

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

4-binary/02-text-decoder/article.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,21 @@ let binaryString = uint8Array.subarray(1, -1);
5252
alert( new TextDecoder().decode(binaryString) ); // Hello
5353
```
5454

55-
## TextEncoder
55+
## رمزگذار متن
5656

57-
[TextEncoder](https://encoding.spec.whatwg.org/#interface-textencoder) does the reverse thing -- converts a string into bytes.
57+
شی رمزگذار متن([TextEncoder](https://encoding.spec.whatwg.org/#interface-textencoder)) برعکس کار را انجام می‌دهد -- یک رشته را به بایت‌ها تبدیل می‌کند.
5858

59-
The syntax is:
59+
سینتکس آن به صورت زیر است:
6060

6161
```js
6262
let encoder = new TextEncoder();
6363
```
6464

65-
The only encoding it supports is "utf-8".
65+
تنها رمزگذاری‌ای که رمزگذار متن از آن پشتیبانی می‌کند "utf-8" می‌باشد.
6666

67-
It has two methods:
68-
- **`encode(str)`** -- returns `Uint8Array` from a string.
69-
- **`encodeInto(str, destination)`** -- encodes `str` into `destination` that must be `Uint8Array`.
67+
رمزگذار متن دو متد دارد:
68+
- متد **`encode(str)`** -- از یک رشته، `Uint8Array` را برمیگرداند.
69+
- متد **`encodeInto(str, destination)`** -- رشته‌ی `str` را درون `destination` که باید `Uint8Array` باشد، رمزگذاری می‌کند.
7070

7171
```js run
7272
let encoder = new TextEncoder();

0 commit comments

Comments
 (0)