added trim operand function.

This commit is contained in:
Brad Arant committed 2025-01-16 13:39:09 -08:00
1 parent f7812821b3
commit 5cefb0974b
2 files changed
+9 -1

No files matched your search

+7 -1
View File
@@ -78,7 +78,13 @@ namespace jet {
} else
throw coreutils::Exception("Expecting ) at end of RIGHT expression.");
} else if(in.ifNextIgnoreCase("TRIM")) {
if(!in.ifNext("("))
throw coreutils::Exception("Expecting ( for TRIM parameters.");
Operand parm1(in, tag);
if(in.ifNext(")")) {
string = parm1.string.trim();
} else
throw coreutils::Exception("Expecting ) at end of TRIM expression.");
} else if(in.ifNextIgnoreCase("TOUPPER")) {
} else if(in.ifNextIgnoreCase("TOLOWER")) {