@Test public void invokeMatchExists() { FunctionTestUtil.assertResult(substringAfterFunction.invoke("foobar", "ob"), "ar"); FunctionTestUtil.assertResult(substringAfterFunction.invoke("foobar", "o"), "obar"); }
public FEELFnResult<String> invoke(@ParameterName( "string" ) String string, @ParameterName( "match" ) String match) { if ( string == null ) { return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "string", "cannot be null")); } if ( match == null ) { return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "match", "cannot be null")); } int index = string.indexOf( match ); if( index >= 0 ) { return FEELFnResult.ofResult( string.substring( index+match.length() ) ); } else { return FEELFnResult.ofResult( "" ); } }
SubstringAfterFunction extends BaseFEELFunction { public FEELFnResult<String> invoke(@ParameterName( "string" ) String string, @ParameterName( "match" ) String match) { if ( string == null ) { return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "string", "cannot be null")); } if ( match == null ) { return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "match", "cannot be null")); } int index = string.indexOf( match ); if( index >= 0 ) { return FEELFnResult.ofResult( string.substring( index+match.length() ) ); } else { return FEELFnResult.ofResult( "" ); } } }
SubstringAfterFunction extends BaseFEELFunction { public FEELFnResult<String> invoke(@ParameterName( "string" ) String string, @ParameterName( "match" ) String match) { if ( string == null ) { return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "string", "cannot be null")); } if ( match == null ) { return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "match", "cannot be null")); } int index = string.indexOf( match ); if( index >= 0 ) { return FEELFnResult.ofResult( string.substring( index+match.length() ) ); } else { return FEELFnResult.ofResult( "" ); } } SubstringAfterFunction(); }
SubstringAfterFunction extends BaseFEELFunction { public FEELFnResult<String> invoke(@ParameterName( "string" ) String string, @ParameterName( "match" ) String match) { if ( string == null ) { return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "string", "cannot be null")); } if ( match == null ) { return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "match", "cannot be null")); } int index = string.indexOf( match ); if( index >= 0 ) { return FEELFnResult.ofResult( string.substring( index+match.length() ) ); } else { return FEELFnResult.ofResult( "" ); } } SubstringAfterFunction(); FEELFnResult<String> invoke(@ParameterName( "string" ) String string, @ParameterName( "match" ) String match); }
SubstringAfterFunction extends BaseFEELFunction { public FEELFnResult<String> invoke(@ParameterName( "string" ) String string, @ParameterName( "match" ) String match) { if ( string == null ) { return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "string", "cannot be null")); } if ( match == null ) { return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "match", "cannot be null")); } int index = string.indexOf( match ); if( index >= 0 ) { return FEELFnResult.ofResult( string.substring( index+match.length() ) ); } else { return FEELFnResult.ofResult( "" ); } } SubstringAfterFunction(); FEELFnResult<String> invoke(@ParameterName( "string" ) String string, @ParameterName( "match" ) String match);  }