Class StartsWith

java.lang.Object
com.ezylang.evalex.functions.AbstractFunction
me.hsgamer.hscore.expression.StringComparator
me.hsgamer.hscore.expression.string.StartsWith
All Implemented Interfaces:
com.ezylang.evalex.functions.FunctionIfc

@FunctionParameter(name="string") @FunctionParameter(name="substring") public class StartsWith extends StringComparator
Check if the 1st string starts with the 2nd string
Ex: STRSTW("String", "Str")
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    compare(@NotNull String s1, @NotNull String s2)
    Compare the two strings

    Methods inherited from class me.hsgamer.hscore.expression.StringComparator

    evaluate

    Methods inherited from class com.ezylang.evalex.functions.AbstractFunction

    getFunctionParameterDefinitions, hasVarArgs, validatePreEvaluation

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.ezylang.evalex.functions.FunctionIfc

    isParameterLazy
  • Constructor Details

    • StartsWith

      public StartsWith()
  • Method Details

    • compare

      public boolean compare(@NotNull @NotNull String s1, @NotNull @NotNull String s2)
      Description copied from class: StringComparator
      Compare the two strings
      Specified by:
      compare in class StringComparator
      Parameters:
      s1 - the 1st string
      s2 - the 2nd string
      Returns:
      the result