For AI agents: the complete documentation index is available at /hclapi/llms.txt, the full documentation bundle is available at /hclapi/llms-full.txt, and this page is available as Markdown at /hclapi/docs/manifest/functions/strings/trim_space.md.

trim_space

Removes leading and trailing whitespace characters (spaces, tabs, newlines) from a string.

Signature

trim_space(str: string) -> string

Parameters

ParameterTypeRequiredDescription
strstringyesInput string

Return value

Returns the documented result for the function signature.

Example

args = { query = "%${trim_space(ctx.request.query.q)}%" }