Class StringSplitFunction

  • All Implemented Interfaces:
    FunctionIfc

    @FunctionParameter(name="string") @FunctionParameter(name="separator")
    public class StringSplitFunction
    extends AbstractFunction
    A function that splits a string into an array, separators specified.

    For example:

     STR_SPLIT("2024/07/15", "/")  = ["2024", "07", "15"]
     STR_SPLIT("myFile.json", ".") = ["myFile", "json"]
     
    Author:
    oswaldobapvicjr
    • Constructor Detail

      • StringSplitFunction

        public StringSplitFunction()
    • Method Detail

      • evaluate

        public EvaluationValue evaluate​(Expression expression,
                                        Token functionToken,
                                        EvaluationValue... parameterValues)
                                 throws EvaluationException
        Description copied from interface: FunctionIfc
        Performs the function logic and returns an evaluation result.
        Parameters:
        expression - The expression, where this function is executed. Can be used to access the expression configuration.
        functionToken - The function token from the parsed expression.
        parameterValues - The parameter values.
        Returns:
        The evaluation result in form of a EvaluationValue.
        Throws:
        EvaluationException - In case there were problems during evaluation.