stringToBuffer
Start from API_LEVEL
4.0. Please refer to API_LEVEL.
Convert string type to ArrayBuffer type.
Type
function stringToBuffer(str: InputString): Result
Parameters
InputString
| Type | Description |
|---|---|
string | The string to be converted |
Result
| Type | Description |
|---|---|
ArrayBuffer | The converted ArrayBuffer |
Example
import { stringToBuffer } from '@zos/utils'
const buffer = stringToBuffer('Hello Zepp OS')