Name

sortReverse()

Class

StringList

Description

A sort in reverse. It's equivalent to running sort() and then reverse(), but is more efficient than running each separately.

Examples

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

Syntax

  • .sortReverse()

Return

  • void