Class StringLib.match

All Implemented Interfaces:
KryoSerializable
Enclosing class:
StringLib

public static final class StringLib.match extends VarArgFunction
string.match (s, pattern [, init]) Looks for the first match of pattern in the string s. If it finds one, then match returns the captures from the pattern; otherwise it returns nil. If pattern specifies no captures, then the whole match is returned. A third, optional numerical argument init specifies where to start the search; its default value is 1 and may be negative.
  • Constructor Details

    • match

      public match()
  • Method Details

    • invoke

      public Varargs invoke(Varargs args)
      Description copied from class: VarArgFunction
      Subclass responsibility. May not have expected behavior for tail calls. Should not be used if: - function has a possibility of returning a TailcallVarargs
      Overrides:
      invoke in class VarArgFunction
      Parameters:
      args - the arguments to the function call.