This page explains how to use the trim_space function in APL.
trim_space
function in APL to remove leading and trailing whitespace characters from a string. This function is especially useful when cleaning up input from logs, APIs, or user-generated content where strings may contain unintended spaces. You can apply trim_space
to normalize data before comparisons, joins, or aggregations that depend on exact string matches.
Use trim_space
when you need to ensure that extraneous spaces at the beginning or end of a string don’t interfere with your analysis or results.
Splunk SPL users
trim
function removes leading and trailing spaces. APL’s trim_space
works similarly.ANSI SQL users
TRIM()
function removes leading and trailing whitespace by default. APL’s trim_space
achieves the same behavior.Name | Type | Description |
---|---|---|
value | string | The input string to trim. |
trim_space
to normalize request paths.Querycleaned_uri | count |
---|---|
/api/data | 120 |
/api/data/submit | 88 |
/login | 42 |
uri
and aggregates request counts by the cleaned path.