tableSize property

int get tableSize

Begins at field "1" and increments this key by one until no field is found with that key. Returns the largest integer field found minus one. This mimics lua's table len (#) behavior.

Implementation

int get tableSize {
  uses++;
  _onRead?.call('self');

  int i = 1;
  while (hasField(i.toString())) {
    i++;
  }

  return i - 1;
}