text: public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval arg0,ValueEval arg1) {String arg;int index;try {arg = evaluateStringArg(arg0, srcRowIndex, srcColumnIndex);index = evaluateIntArg(arg1, srcRowIndex, srcColumnIndex);} catch (EvaluationException e) {return e.getErrorEval();}if(index < 0) {return ErrorEval.VALUE_INVALID;}String result;if (_isLeft) {result = arg.substring(0, Math.min(arg.length(), index));} else {result = arg.substring(Math.max(0, arg.length()-index));}return new StringEval(result);}