mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
testing: Use indexOfScalar instead of indexOf
This commit is contained in:
parent
5ebcd8ccaf
commit
1943c2dc68
@ -431,7 +431,7 @@ fn printIndicatorLine(source: []const u8, indicator_index: usize) void {
|
||||
|
||||
fn printWithVisibleNewlines(source: []const u8) void {
|
||||
var i: usize = 0;
|
||||
while (std.mem.indexOf(u8, source[i..], "\n")) |nl| : (i += nl + 1) {
|
||||
while (std.mem.indexOfScalar(u8, source[i..], '\n')) |nl| : (i += nl + 1) {
|
||||
printLine(source[i .. i + nl]);
|
||||
}
|
||||
print("{s}␃\n", .{source[i..]}); // End of Text symbol (ETX)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user