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/split.md.

split

Splits a string into a list of substrings separated by separator.

Signature

split(separator: string, str: string) -> list(string)

Parameters

ParameterTypeRequiredDescription
separator, strstring, stringyesSeparator and source string

Return value

Returns the documented result for the function signature.

Example

respond {
  status = 200
  body = { filters = split(",", coalesce(ctx.request.query.filters, "")) }
}