fixed right() expression.
This commit is contained in:
parent
f1f45af332
commit
f7812821b3
@ -72,10 +72,9 @@ namespace jet {
|
|||||||
Operand parm2(in, tag);
|
Operand parm2(in, tag);
|
||||||
if(in.ifNext(")")) {
|
if(in.ifNext(")")) {
|
||||||
int len = parm1.string.getLength();
|
int len = parm1.string.getLength();
|
||||||
int start = len - parm2.string.asInteger();
|
int size = parm2.string.asInteger();
|
||||||
std::cout << "len: " << len << "; start: " << start << ";" << std::endl;
|
int start = len - size;
|
||||||
string = parm1.string.substring(0, parm2.string.asInteger());
|
string = parm1.string.substring(start, size);
|
||||||
std::cout << "string: " << string << std::endl;
|
|
||||||
} else
|
} else
|
||||||
throw coreutils::Exception("Expecting ) at end of RIGHT expression.");
|
throw coreutils::Exception("Expecting ) at end of RIGHT expression.");
|
||||||
} else if(in.ifNextIgnoreCase("TRIM")) {
|
} else if(in.ifNextIgnoreCase("TRIM")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user