lastIndex property

int get lastIndex

Implementation

int get lastIndex => isEmpty ? 0 : length - 1;