Class StringLib.sub

All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
Enclosing class:
StringLib

public static final class StringLib.sub extends VarArgFunction
string.sub (s, i [, j]) Returns the substring of s that starts at i and continues until j; i and j may be negative. If j is absent, then it is assumed to be equal to -1 (which is the same as the string length). In particular, the call string.sub(s,1,j) returns a prefix of s with length j, and string.sub(s, -i) returns a suffix of s with length i.
  • Constructor Details

    • sub

      public sub()
  • 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.