$(NDSLICEREF slice, Slice)!(string*, 2).
// empty lines are allowed by default auto data = `012,abc,"mno pqr",0` ~ "\n\n" ~ `982,def,"stuv wx",1` ~ "\n" ~ `78,ghijk,"yx",2`; auto matrix = data.csvToStringMatrix(); import mir.ndslice.slice: Slice, SliceKind; static assert(is(typeof(matrix) == Slice!(string*, 2))); import mir.test: should; matrix.should == [[`012`, `abc`, `mno pqr`, `0`], [`982`, `def`, `stuv wx`, `1`], [`78`, `ghijk`, `yx`, `2`]]; import mir.ndslice.dynamic: transposed; auto transp = matrix.transposed; static assert(is(typeof(transp) == Slice!(string*, 2, SliceKind.universal))); transp.should == [[`012`, `982`, `78`], [`abc`, `def`, `ghijk`], [`mno pqr`, `stuv wx`, `yx`], [`0`, `1`, `2`]];