Function S2CellId.parent

Returns the cell at the previous level or at the given level (which must be less than or equal to the current level).

S2CellId parent() const;