--- title: "Trimming and padding" slug: "dev-database-reference-sql-functions-string-trimming-and-padding" updated: 2026-10-30T18:18:56Z published: 2026-10-30T18:18:56Z canonical: "docs.vastdata.com/dev-database-reference-sql-functions-string-trimming-and-padding" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.vastdata.com/llms.txt > Use this file to discover all available pages before exploring further. # Trimming and padding *Applies to VAST Cluster 5.5.* Removing characters from the ends of a string, and padding it to a width. Each function has its own page: syntax, what it does, NULLs and edge cases, examples with their output, how it runs in VAST, how to make it faster, limitations and errors, and similar functions. Names that the VAST Query Engine doesn't have are in [all functions A-Z](/develop/docs/dev-database-reference-sql-functions-a-z). ## Trimming and padding | Function | What it does | | --- | --- | | [ltrim](/develop/docs/dev-database-reference-sql-functions-string-ltrim) | Remove spaces, or any characters you list, from the start of a VARCHAR. | | [rtrim](/develop/docs/dev-database-reference-sql-functions-string-rtrim) | Remove spaces, or any characters you list, from the end of a VARCHAR. | | [trim](/develop/docs/dev-database-reference-sql-functions-string-trim) | Remove spaces, or any characters you list, from both ends of a VARCHAR; trim(BOTH \| LEADING \| TRAILING chars FROM s) is the standard SQL form. | | [lpad](/develop/docs/dev-database-reference-sql-functions-string-lpad) | Pad a VARCHAR on the left with a fill string to a given number of characters, or cut it to that length. | | [rpad](/develop/docs/dev-database-reference-sql-functions-string-rpad) | Pad a VARCHAR on the right with a fill string to a given number of characters, or cut it to that length. | ## See also - [SQL functions](/develop/docs/dev-database-reference-sql-functions-index) and [all functions A-Z](/develop/docs/dev-database-reference-sql-functions-a-z).