Sfoglia il codice sorgente

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 anni fa
parent
commit
f2225b2692
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      zig/sdl/hello_sdl.zig

+ 1 - 1
zig/sdl/hello_sdl.zig

705
                var part = parts.next();
705
                var part = parts.next();
706
                while (part != null and part.?.len != repl_size) : (part = parts.next()) {
706
                while (part != null and part.?.len != repl_size) : (part = parts.next()) {
707
                    if (part.?.len > 0) {
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