add upper and lower to operand functions.
This commit is contained in:
parent
80d31540d9
commit
167ee75658
17
Operand.cpp
17
Operand.cpp
@ -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")) {
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user