Skip to content

Commit

Permalink
make use of built-in string functions from EvalEx
Browse files Browse the repository at this point in the history
  • Loading branch information
HSGamer committed Jul 16, 2024
1 parent 4e5f3a6 commit e5c02d8
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

import com.ezylang.evalex.config.ExpressionConfiguration;
import com.ezylang.evalex.functions.FunctionIfc;
import com.ezylang.evalex.functions.basic.AverageFunction;
import com.ezylang.evalex.functions.string.StringContains;
import com.ezylang.evalex.functions.string.StringEndsWithFunction;
import com.ezylang.evalex.functions.string.StringStartsWithFunction;
import com.ezylang.evalex.operators.OperatorIfc;
import me.hsgamer.hscore.expression.number.Average;
import me.hsgamer.hscore.expression.string.*;

import java.util.Map;
Expand All @@ -18,14 +21,14 @@ public final class ExpressionUtils {
static {
expressionConfigurationModifier = configuration ->
configuration.withAdditionalFunctions(
Map.entry("AVG", new Average()),
Map.entry("STRCT", new Contains()),
Map.entry("STREDW", new EndsWith()),
Map.entry("AVG", new AverageFunction()),
Map.entry("STRCT", new StringContains()),
Map.entry("STREDW", new StringEndsWithFunction()),
Map.entry("STREQ", new Equals()),
Map.entry("STREQIC", new EqualsIgnoreCase()),
Map.entry("STRLEN", new Length()),
Map.entry("STRMP", new MatchPattern()),
Map.entry("STRSTW", new StartsWith())
Map.entry("STRSTW", new StringStartsWithFunction())
);
}

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit e5c02d8

Please sign in to comment.