Add ltrim and rtrim expression functions

ltrim(x) removes leading blanks and rtrim(x) removes trailing blanks,
using the same characters trim removes (space, tab, newline). rtrim
counts by index so an all-blank value becomes empty. The manual now
documents trim, ltrim and rtrim with examples.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brad ArantandClaude Opus 5.5 committed 2026-11-20 15:07:33 +00:00
1 parent 5f9a53aba2
commit ec3e40b71a
3 files changed
+57 -2

No files matched your search

BIN
View File
Binary file not shown.
+26 -1
View File
@@ -263,6 +263,15 @@ the second parameter from the parameter passed as the first parameter.
If the number of characters to return is greater than the length of
the first parameter then the entire parameter is returned.
\subsection{ltrim}
Use the ltrim function to remove the leading blanks (spaces, tabs and
newlines) from a value. Trailing blanks are kept.
\begin{verbatim}
ltrim(' abc ') returns 'abc '
\end{verbatim}
\subsection{reverse}
\subsection{right}
@@ -270,7 +279,16 @@ the first parameter then the entire parameter is returned.
\subsection{round}
Use the round function to round a numeric value to the specified
number of digits after the decimal point.
number of digits after the decimal point.
\subsection{rtrim}
Use the rtrim function to remove the trailing blanks (spaces, tabs and
newlines) from a value. Leading blanks are kept.
\begin{verbatim}
rtrim(' abc ') returns ' abc'
\end{verbatim}
\subsection{substring}
@@ -283,6 +301,13 @@ the value as a string.
\subsection{trim}
Use the trim function to remove the blanks (spaces, tabs and newlines)
from both ends of a value. See also ltrim and rtrim.
\begin{verbatim}
trim(' abc ') returns 'abc'
\end{verbatim}
\subsection{expr}
Use the expr function to parse the string contents contained in the expr string.