This page explains how to use the quote function in APL.
quote
function in APL to return a string literal representation of a given input value. This function wraps the value in double quotation marks and escapes any internal double quotes or special characters as needed. This is especially useful when you want to ensure that string values are safely embedded in dynamically constructed queries, logs, or debug output without being misinterpreted.
You can use quote
to:
Splunk SPL users
quote
. However, you can use tostring()
or replace()
combinations to prepare literal-safe outputs, although escaping and quoting must often be handled manually.ANSI SQL users
quote()
function. You typically handle quoting and escaping manually using REPLACE()
or CONCAT()
to build quoted strings, which can be error-prone for nested or dynamic queries.Name | Type | Description |
---|---|---|
value | string | The value to quote and escape |
string
value representing the input enclosed in double quotes, with internal quotes and escape sequences handled appropriately.
quoted_uri | count_ |
---|---|
“/api/login” | 83 |
”/api/purchase” | 61 |
”/search?q%3Derror” | 12 |