[strings.trim]
strings.trim is a slot in the strings namespace, in Hyperlambda, the language of Magic Cloud. Trims characters from both ends of the specified string.
- Value (
text), required: Text to trim - Returns: Resolves to the trimmed string
Arguments
Required arguments come first, then the optional ones in the order they are declared.
| Argument | Type | Required | Description |
|---|---|---|---|
| unnamed child node | string | no | Optional characters to trim. |
Guide: How to use [strings.trim]
JSON declaration
This is the complete declaration of strings.trim, as the running system describes it. It is also published as slot.json.
JSON declaration
{
"name": "strings.trim",
"description": "Trims characters from both ends of the specified string",
"signature": {
"input": {
"kind": "text",
"description": "Text to trim",
"required": true,
"mode": "ValueOrExpression"
},
"children": [
{
"type": "string",
"kind": "trim-characters",
"description": "Optional characters to trim",
"required": false,
"mode": "ExecutableLambda",
"cardinality": "ZeroOrOne",
"role": "SourceExpression",
"evaluation": "EvalSelf",
"projection": "Value"
}
],
"output": {
"mode": "Value",
"kind": "text",
"description": "Resolves to the trimmed string"
}
}
}
← strings.to-upper |
all strings.* slots |
strings.trim-end → |