Removes a suffix from the end of a string if present.
trim_suffix(str: string, suffix: string) -> string
Returns the documented result for the function signature.
respond { status = 200, body = { file = trim_suffix(ctx.request.query.file, ".json") } }