add upper and lower to operand functions.

This commit is contained in:
Brad Arant 2025-02-13 10:27:44 -08:00
parent 80d31540d9
commit 167ee75658
2 changed files with 17 additions and 3 deletions

View File

@ -86,10 +86,21 @@ namespace jet {
} else
throw coreutils::Exception("Expecting ) at end of TRIM expression.");
} else if(in.ifNextIgnoreCase("TOUPPER")) {
if(!in.ifNext("("))
throw coreutils::Exception("Expecting ( for TOUPPER parameters.");
Operand parm1(in, tag);
if(in.ifNext(")")) {
string = parm1.string.toUpper();
} else
throw coreutils::Exception("Expecting ) at end of TOUPPER expression.");
} else if(in.ifNextIgnoreCase("TOLOWER")) {
if(!in.ifNext("("))
throw coreutils::Exception("Expecting ( for TOLOWER parameters.");
Operand parm1(in, tag);
if(in.ifNext(")")) {
string = parm1.string.toLower();
} else
throw coreutils::Exception("Expecting ) at end of TOLOWER expression.");
} else if(in.ifNextIgnoreCase("REVERSE")) {
} else if(in.ifNextIgnoreCase("CONCAT")) {

View File

@ -21,4 +21,7 @@ $[ix]
$[ix]
<set name="test64" value="this is a test" />
$[test64;tobase64]
$[test64;toupper]
<set name="testupperexpr" expr="toupper($[test64])" />
$[testupperexpr]
</jet>