* @see com.consol.citrus.functions.Function#execute(java.util.List, com.consol.citrus.context.TestContext)
* @throws InvalidFunctionUsageException
*/
public String execute(List<String> parameterList, TestContext context) {
if (parameterList == null || parameterList.size() < 2) {
throw new InvalidFunctionUsageException("Insufficient function parameters - parameter usage: (targetString, beginIndex, [endIndex])");
}
String targetString = parameterList.get(0);
String beginIndex = parameterList.get(1);
String endIndex = null;
if (!StringUtils.hasText(beginIndex)) {
throw new InvalidFunctionUsageException("Invalid beginIndex - please check function parameters");
}
if (parameterList.size() > 2) {
endIndex = parameterList.get(2);
}