public ValueEval evaluate(int srcRowIndex, int srcColumnIndex, ValueEval text, ValueEval number_times) {ValueEval veText1;try {veText1 = OperandResolver.getSingleValue(text, srcRowIndex, srcColumnIndex);} catch (EvaluationException e) {return e.getErrorEval();}String strText1 = OperandResolver.coerceValueToString(veText1);double numberOfTime = 0;try {numberOfTime = OperandResolver.coerceValueToDouble(number_times);} catch (EvaluationException e) {return ErrorEval.VALUE_INVALID;}int numberOfTimeInt = (int)numberOfTime;StringBuilder strb = new StringBuilder(strText1.length() * numberOfTimeInt);for(int i = 0; i < numberOfTimeInt; i++) {strb.append(strText1);}if (strb.toString().length() > 32767) {return ErrorEval.VALUE_INVALID;}return new StringEval(strb.toString());}
public override ValueEval Evaluate(int srcRowIndex, int srcColumnIndex, ValueEval text, ValueEval number_times){ValueEval veText1;try{veText1 = OperandResolver.GetSingleValue(text, srcRowIndex, srcColumnIndex);}catch (EvaluationException e){return e.GetErrorEval();}String strText1 = OperandResolver.CoerceValueToString(veText1);double numberOfTime = 0;try{numberOfTime = OperandResolver.CoerceValueToDouble(number_times);}catch (EvaluationException){return ErrorEval.VALUE_INVALID;}int numberOfTimeInt = (int)numberOfTime;StringBuilder strb = new StringBuilder(strText1.Length * numberOfTimeInt);for (int i = 0; i < numberOfTimeInt; i++){strb.Append(strText1);}if (strb.ToString().Length > 32767){return ErrorEval.VALUE_INVALID;}return new StringEval(strb.ToString());}