Class StringFormatFunction

  • All Implemented Interfaces:
    FunctionIfc

    @FunctionParameter(name="format") @FunctionParameter(name="arguments",isVarArg=true)
    public class StringFormatFunction
    extends AbstractFunction
    Returns a formatted string using the specified format string and arguments, using the configured locale.

    For example:

    STR_FORMAT("Welcome to %s!", "EvalEx")

    The result is produced using String.format(String, Object...).

    Author:
    oswaldobapvicjr
    • Constructor Detail

      • StringFormatFunction

        public StringFormatFunction()
    • Method Detail

      • evaluate

        public EvaluationValue evaluate​(Expression expression,
                                        Token functionToken,
                                        EvaluationValue... parameterValues)
        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.