diff options
| author | Ryan Liptak <squeek502@hotmail.com> | 2023-05-04 18:15:50 -0700 |
|---|---|---|
| committer | Ryan Liptak <squeek502@hotmail.com> | 2023-05-13 13:45:05 -0700 |
| commit | 2129f28953b72da2f1bb58ff063a044d737c59c4 (patch) | |
| tree | d8b12c947b4936cd96f753537c6effd36b2cb0c2 /doc/docgen.zig | |
| parent | 815e53b147a321d0bdb47dc008aa8181f57175ac (diff) | |
| download | zig-2129f28953b72da2f1bb58ff063a044d737c59c4.tar.gz zig-2129f28953b72da2f1bb58ff063a044d737c59c4.zip | |
Update all std.mem.split calls to their appropriate function
Everywhere that can now use `splitScalar` should get a nice little performance boost.
Diffstat (limited to 'doc/docgen.zig')
| -rw-r--r-- | doc/docgen.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/docgen.zig b/doc/docgen.zig index 07636fd152..82f2d9b199 100644 --- a/doc/docgen.zig +++ b/doc/docgen.zig @@ -1223,7 +1223,7 @@ fn printShell(out: anytype, shell_content: []const u8, escape: bool) !void { const trimmed_shell_content = mem.trim(u8, shell_content, " \n"); try out.writeAll("<figure><figcaption class=\"shell-cap\">Shell</figcaption><pre><samp>"); var cmd_cont: bool = false; - var iter = std.mem.split(u8, trimmed_shell_content, "\n"); + var iter = std.mem.splitScalar(u8, trimmed_shell_content, '\n'); while (iter.next()) |orig_line| { const line = mem.trimRight(u8, orig_line, " "); if (!cmd_cont and line.len > 1 and mem.eql(u8, line[0..2], "$ ") and line[line.len - 1] != '\\') { |
