Name

size()

Class

StringList

Description

Get the length of the list.

Examples

  • StringList inventory;
    
    void setup() {
      size(200, 200);
      inventory = new StringList();
      inventory.append("coffee");
      inventory.append("flour");
      inventory.append("tea");
      println(inventory);
      int s = inventory.size();
      println(s);
    }
    
    

Syntax

  • .size()

Return

  • int