Crate xcolabel

Crate xcolabel 

Source
Expand description

§xcolabel

Convert between column label to 0-based number.

xcolabel converts between 0-based numbers and column labels of spreadsheet software. For example, “A” becomes 0. “AA” becomes 26. It also converts tuples of the form (row, column) into strings like “C2”.

§Status

xcolabel is a pure Rust library. Everything except TryFromCellStr has been implemented.

§Examples

use xcolabel::ToCellString;

assert_eq!((4u32, 2u32).to_cell_string(), "C5"); // value is 0-based (row, column)

Structs§

ParseIntError
Same manneor as std::num::ParseIntError

Enums§

IntErrorKind
Enum to store the various types of errors that can cause parsing an integer to fail.

Traits§

ToCellString
A trait to convert to cell string like “C4”
ToColumnDigit
ToColumnString
A trait to convert to column string like “A” for 0. It is 0
TryFromCellStr
A trait to convert from cell string like “C4”
TryFromColumnStr
A trait to convert from a column string like “AA” for 26. It is 0-based.

Functions§

from_digit_column
convert number to char of column label like ‘A’