Text.getNSelections

int getNSelections()

Gets the number of selected regions.

Returns

The number of selected regions, or -1 in the case of failure.