> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
| init | string[][] \| Record<string, string> \| string \| URLSearchParams | No| Input parameter objects, which include the following:<br>- **string[][]**: two-dimensional string array<br>- **Record<string, string>**: list of objects<br>- **string**: string<br>- **URLSearchParams**: object|
| init | string[][]\| Record<string, string>\| string \| URLSearchParams | No| Input parameter objects, which include the following:<br>- **string[][]**: two-dimensional string array<br>- **Record<string, string>**: list of objects<br>- **string**: string<br>- **URLSearchParams**: object |
Obtains an ES6 iterator. Each item of the iterator is a JavaScript array, and the first and second fields of each array are the key and value respectively.
Sets the value for a key. If key-value pairs matching the specified key exist, the value of the first key-value pair will be set to the specified value and other key-value pairs will be deleted. Otherwise, the key-value pair will be appended to the query string.
paramsObject.set('baz',3);// Add a third parameter.
```
...
...
@@ -246,13 +261,14 @@ paramsObject.set('baz', 3); // Add a third parameter.
sort(): void
Sorts all key-value pairs contained in this object based on the Unicode code points of the keys and returns undefined. This method uses a stable sorting algorithm, that is, the relative order between key-value pairs with equal keys is retained.
Obtains an ES6 iterator. Each item of the iterator is a JavaScript array, and the first and second fields of each array are the key and value respectively.
> The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version.
This module provides common utility functions, such as **TextEncoder** and **TextDecoder** for string encoding and decoding, **RationalNumber** for rational number operations, **LruBuffer** for buffer management, **Scope** for range determination, **Base64** for Base64 encoding and decoding, and **types** for checks of built-in object types.
This module provides common utility functions, such as **TextEncoder** and **TextDecoder** for string encoding and decoding, **RationalNumber** for rational number operations, **LruBuffer** for buffer management, **Scope** for range determination, **Base64** for Base64 encoding and decoding, and **Types** for checks of built-in object types.
## Modules to Import
...
...
@@ -140,7 +141,7 @@ Processes an asynchronous function and returns a promise version.
| ignoreBOM | boolean | Yes| No| Whether to ignore the byte order marker (BOM). The default value is **false**, which indicates that the result contains the BOM.|
@@ -361,7 +360,6 @@ Compares this **RationalNumber** object with a given object.
| number | Returns **0** if the two objects are equal; returns **1** if the given object is less than this object; return **-1** if the given object is greater than this object.|
@@ -484,7 +482,7 @@ Obtains the denominator of this **RationalNumber** object.
### isZero<sup>8+</sup>
isZero():boolean
isZero():boolean
Checks whether this **RationalNumber** object is **0**.
...
...
@@ -524,7 +522,7 @@ Checks whether this **RationalNumber** object is a Not a Number (NaN).
### isFinite<sup>8+</sup>
isFinite():boolean
isFinite():boolean
Checks whether this **RationalNumber** object represents a finite value.
...
...
@@ -825,7 +823,7 @@ Obtains the value of the specified key.
**Return value**
| Type| Description|
| -------- | -------- |
| V \| undefind | Returns the value of the key if a match is found in the buffer; returns **undefined** otherwise.|
| V\|undefind | Returns the value of the key if a match is found in the buffer; returns **undefined** otherwise.|
**Example**
```js
...
...
@@ -872,7 +870,7 @@ Obtains all values in this buffer, listed from the most to the least recently ac
**Return value**
| Type| Description|
| -------- | -------- |
| V [] | All values in the buffer, listed from the most to the least recently accessed.|
| V[] | All values in the buffer, listed from the most to the least recently accessed.|
**Example**
```js
...
...
@@ -895,7 +893,7 @@ Obtains all keys in this buffer, listed from the most to the least recently acce
**Return value**
| Type| Description|
| -------- | -------- |
| K [] | All keys in the buffer, listed from the most to the least recently accessed.|
| K[] | All keys in the buffer, listed from the most to the least recently accessed.|
**Example**
```js
...
...
@@ -921,7 +919,7 @@ Removes the specified key and its value from this buffer.
**Return value**
| Type| Description|
| -------- | -------- |
| V \| undefind | Returns an **Optional** object containing the removed key-value pair if the key exists in the buffer; returns an empty **Optional** object otherwise. If the key is null, an exception will be thrown.|
| V\|undefind | Returns an **Optional** object containing the removed key-value pair if the key exists in the buffer; returns an empty **Optional** object otherwise. If the key is null, an exception will be thrown.|
**Example**
```js
...
...
@@ -1038,7 +1036,7 @@ Obtains a new iterator object that contains all key-value pairs in this object.
**Return value**
| Type| Description|
| -------- | -------- |
| [K, V] | Iterable array.|
| [K,V] | Iterable array.|
**Example**
```js
...
...
@@ -1059,7 +1057,7 @@ Obtains a two-dimensional array in key-value pairs.
**Return value**
| Type| Description|
| -------- | -------- |
| [K, V] | Two-dimensional array in key-value pairs.|
| [K,V] | Two-dimensional array in key-value pairs.|
**Example**
```js
...
...
@@ -1092,6 +1090,8 @@ Example
```js
classTemperature{
constructor(value){
// If TS is used for development, add the following code:
// private readonly _temp: Temperature;
this._temp=value;
}
comapreTo(value){
...
...
@@ -1183,7 +1183,7 @@ Obtains the intersection of this **Scope** and the given **Scope**.
> The initial APIs of this module are supported since API version 8. Newly added APIs will be marked with a superscript to indicate their earliest API version.
Creates and returns an **XmlPullParser** object. The **XmlPullParser** object passes two parameters. The first parameter is the memory of the **ArrayBuffer** or **DataView** type, and the second parameter is the file format (UTF-8 by default).