╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Title.zig ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭ find file ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╮ ╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │ │ │http│ ssh │ │ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─╯ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
620 621 for (0..3) |text_row| { 622 for (0..3) |text_col| { 623 var pattern: u6 = 0; 624 for (0..3) |sub_row| { 625 for (0..2) |sub_col| { 626 const row_idx = text_row * 3 + sub_row; 627 const col_idx = text_col * 2 + sub_col; 628 if (kept[row_idx][col_idx]) { 629 pattern |= @as(u6, 1) << @intCast(sub_row * 2 + sub_col); 630 } 631 } 632 } 633 const cp = sextantCodepoint(pattern); 634 var utf8_buf: [4]u8 = undefined; 635 const len = try std.unicode.utf8Encode(cp, &utf8_buf); 636 try rows[text_row].appendSlice(allocator, utf8_buf[0..len]); 637 } 638 } 639 } 640 641 var out: std.ArrayList(u8) = .empty; 642 errdefer out.deinit(allocator); 643 try out.appendSlice(allocator, rows[0].items); 644 try out.append(allocator, '\n'); 645 try out.appendSlice(allocator, rows[1].items); 646 try out.append(allocator, '\n'); 647 try out.appendSlice(allocator, rows[2].items); 648 return out.toOwnedSlice(allocator); 649 } 650