tolower function converts all characters in a string to lowercase. Use this function to normalize text for case-insensitive comparisons, standardize log data, or prepare strings for consistent analysis.
For users of other query languages
If you come from other query languages, this section explains how to adjust your existing queries to achieve the same results in APL.Splunk SPL users
Splunk SPL users
In Splunk SPL, you use the
lower function. APL’s tolower provides the same functionality.ANSI SQL users
ANSI SQL users
In ANSI SQL, you use
LOWER for lowercase conversion. APL’s tolower provides the same functionality.Usage
Syntax
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| value | string | Yes | The input string to convert to lowercase. |
Returns
Returns the input string with all characters converted to lowercase.Use case examples
- Log analysis
- OpenTelemetry traces
- Security logs
Normalize HTTP methods for case-insensitive aggregation and analysis.QueryRun in PlaygroundOutput
This query normalizes HTTP methods to lowercase, ensuring that ‘GET’, ‘Get’, and ‘get’ are all counted together for accurate request analysis.
| normalized_method | status | request_count |
|---|---|---|
| get | 200 | 5432 |
| post | 201 | 2341 |
| get | 404 | 1987 |
List of related functions
- toupper: Converts strings to uppercase. Use this for the opposite transformation.
- totitle: Converts strings to title case. Use this for capitalized word formatting.
- strcmp: Compares strings. Use tolower before strcmp for case-insensitive comparisons.
- replace_string: Replaces strings. Use tolower to normalize before replacements.