Selaa lähdekoodia

Show full line with escape sequences

Escape sequences are weird, because they specify numbers that "look
like" bytes but they actually seem to care about the character values.
E.g. not byte 30 but character '3' and character '0'.  Odd.
Luna Stadler 4 vuotta sitten
vanhempi
commit
f2225b2692
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      zig/sdl/hello_sdl.zig

+ 1 - 1
zig/sdl/hello_sdl.zig

@ -705,7 +705,7 @@ pub fn main() !void {
705 705
                var part = parts.next();
706 706
                while (part != null and part.?.len != repl_size) : (part = parts.next()) {
707 707
                    if (part.?.len > 0) {
708
                        std.debug.print("escape char: {d} {s}\n", .{ part.?[0], part.?[1..] });
708
                        std.debug.print("escape char: {d} {s}\n", .{ part.?[0], part.?[0..] });
709 709
                    }
710 710
                }
711 711