Function S2CellId.level

Returns the subdivision level of the cell (range 0..MAX_LEVEL).

int level() const;