client.strLength
Get string length
browsernot registered- Package
- @procedures/client · README
- Path
["client","strLength"]- CLI
- Not a
markcommand: it is not in the default registry. - As data
{"$proc":["client","strLength"],"input":{}}- Tags
- core, string
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY, allCoreProcedures } from "@procedures/client";
for (const procedure of allCoreProcedures) {
if (!PROCEDURE_REGISTRY.has(procedure.path)) PROCEDURE_REGISTRY.register(procedure);
}
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["client","strLength"], { value: "<value>" });
console.log(JSON.stringify(result));As data, in a program
{ "$proc": ["client", "strLength"], "input": { "value": "<value>" } }Input
| Field | Type | Required |
|---|---|---|
value | string | yes |
Output
The schema does not list fields (number).
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"value": {
"type": "string",
"description": "The value"
}
},
"required": [
"value"
]
},
"output": {
"type": "number",
"description": "The number of UTF-16 code units"
}
}