class PipelineFunctionSubstringAfter implements PipelineFunction {

    @Override
    public PipelineElement apply(final PipelineElement value, final String paramsIncludingParentheses,
            final ExpressionResolver expressionResolver) {

        final String splitValue = parseAndResolve(paramsIncludingParentheses, expressionResolver);

        return value.onResolved(previousStage -> {
            if (previousStage.contains(splitValue)) {
                return PipelineElement.resolved(previousStage.substring(previousStage.indexOf(splitValue) + 1));
            } else {
                return PipelineElement.unresolved();
            }
        });
    }

}