Sheetshow.Op.DeleteRows (Sheetshow v0.1.0)

Copy Markdown View Source

Removes rows; everything below moves up.

rows is 0-indexed and inclusive, like every range in Sheetshow. Deleting rows shifts the ones below, so a plan with more than one of these applies them bottom-up, or the second one deletes the wrong rows.

iex> Sheetshow.Op.DeleteRows.new("log", 2..4)
%Sheetshow.Op.DeleteRows{sheet: "log", rows: 2..4}

Summary

Functions

How many rows the op removes.

Builds the op. The rows must ascend by one and start at or after row 0.

Types

t()

@type t() :: %Sheetshow.Op.DeleteRows{rows: Range.t(), sheet: String.t()}

Functions

count(delete_rows)

@spec count(t()) :: pos_integer()

How many rows the op removes.

new(sheet, rows)

@spec new(String.t(), Range.t()) :: t()

Builds the op. The rows must ascend by one and start at or after row 0.

iex> Sheetshow.Op.DeleteRows.new("log", 3..3) |> Sheetshow.Op.DeleteRows.count()
1