• Home
Name Date Size #Lines LOC

..--

entry/12-May-2024-757703

screenshots/device/12-May-2024-

.gitignoreD12-May-2024121 88

README.mdD12-May-20241.3 KiB3618

README_zh.mdD12-May-20241 KiB3116

build-profile.json5D12-May-20241.1 KiB4341

hvigorfile.jsD12-May-2024175 21

package.jsonD12-May-2024393 1818

README.md

1# String Encoding and Decoding
2
3### Introduction
4
5This sample shows how to output strings in a specified format and obtain error messages corresponding to error codes. It also demonstrates string encoding and decoding. The sample app is as follows.
6
7![](screenshots/device/image1.png)
8
9### Functions
10
111. Output in a specified format: You can use the app to output a string in different formats.
12
132. Error code parsing: You can input an error code in the app to obtain the corresponding error message.
14
153. Text encoding and decoding: You can use the app to encode and decode strings.
16
17### Required Permissions
18
19N/A
20
21### Usage
22
231. Touch **Output in specified format**. Your input is then displayed in different formats, such as integer, floating point number, and string.
24
252. Touch **Obtain error details**. The error message corresponding to the error code is displayed in the text box on each line.
26
273. Touch **Text encoder**. Your input is then encoded and displayed, together with the information about data reading and writing.
28
294. Touch **Text decoder**. The encoded text content is decoded, and the output displayed is the same as what you input.
30
31### Constraints
32
331. This sample can only be run on standard-system devices.
34
352. This sample requires DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022) to compile and run.
36

README_zh.md

1# 字符串编解码
2
3### 简介
4
5本示例对字符串进行了特定格式的输出,对错误码的内容进行了文本输出,对字符串的编码和解码做了演示结果。实现效果如下:
6
7![](screenshots/device/image.png)
8
9### 相关概念
10
11特定格式输出:可以对字符串进行特定格式的输出。
12
13文本编解码:可以对字符串进行编码和解码的操作。
14
15### 相关权限
16
17不涉及。
18
19### 使用说明
20
211.点击**特定格式输出**,文本框会对该字符串进行不同格式的结果输出,例如整数、浮点数、字符串等格式。
22
232.点击**文本编码器**,会对上面字符串编码,输出编码后的文本,并输出编码返回的读取与写入的信息。
24
253.点击**文本译码器**,会对第二步编码后的文本内容进行译码,输出译码后的文本。
26
27### 约束与限制
28
291.本示例仅支持在标准系统上运行。
30
312.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.992, built on July 14, 2022)才可编译运行。