String s = arg1.toString(); Argument arg3 = new Argument(s.length()); retval = evaluate(context, arg1, arg2, arg3);
startIndex = (int)(Math.floor(arg2.getNumericValue())); startIndex--; if (startIndex < 0) startIndex = 0; extractLen = (int)(Math.floor(arg3.getNumericValue()));  len = s.length(); if (extractLen < 1 || startIndex >= len) {  retval = Argument.emptyString; } else { if (startIndex + extractLen > len) extractLen = len - startIndex;  retval = new Argument(Argument.STRING, s.substring(startIndex, startIndex + extractLen)); }
	public Argument evaluate(ContextStack context, Argument arg1, Argument arg2)		throws MapyrusException	{		Argument retval;		/*		 * Set extract length long enough for all remaining characters in string.		 */		String s = arg1.toString();		Argument arg3 = new Argument(s.length());		retval = evaluate(context, arg1, arg2, arg3);		return(retval);	}