╭─────────────╮ │scroll to top│ ╰─────────────╯ ╭ Title.zig ────────────────────────────────────────────────────╮ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ╰───────────────────────────────────────────────────────────────╯
╭────╮ ╭ clone ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╮ │http│ ssh │ │ ╰────╯ ╰ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ╯
540 541 for (0..3) |text_row| { 542 for (0..3) |text_col| { 543 var pattern: u6 = 0; 544 for (0..3) |sub_row| { 545 for (0..2) |sub_col| { 546 const row_idx = text_row * 3 + sub_row; 547 const col_idx = text_col * 2 + sub_col; 548 if (kept[row_idx][col_idx]) { 549 pattern |= @as(u6, 1) << @intCast(sub_row * 2 + sub_col); 550 } 551 } 552 } 553 const cp = sextantCodepoint(pattern); 554 var utf8_buf: [4]u8 = undefined; 555 const len = try std.unicode.utf8Encode(cp, &utf8_buf); 556 try rows[text_row].appendSlice(allocator, utf8_buf[0..len]); 557 } 558 } 559 } 560 561 var out: std.ArrayList(u8) = .empty; 562 errdefer out.deinit(allocator); 563 try out.appendSlice(allocator, rows[0].items); 564 try out.append(allocator, '\n'); 565 try out.appendSlice(allocator, rows[1].items); 566 try out.append(allocator, '\n'); 567 try out.appendSlice(allocator, rows[2].items); 568 return out.toOwnedSlice(allocator); 569 } 570