refactor: change a -> allocator

This commit is contained in:
CJ van den Berg 2024-09-02 14:31:49 +02:00
parent ad58b1868d
commit 7b812d73ea
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
63 changed files with 896 additions and 896 deletions

View file

@ -55,8 +55,8 @@ fn remove_prefix_in_line(prefix: []const u8, text: []const u8, writer: TextWrite
}
}
pub fn toggle_prefix_in_text(prefix: []const u8, text: []const u8, a: std.mem.Allocator) ![]const u8 {
var result = try std.ArrayList(u8).initCapacity(a, prefix.len + text.len);
pub fn toggle_prefix_in_text(prefix: []const u8, text: []const u8, allocator: std.mem.Allocator) ![]const u8 {
var result = try std.ArrayList(u8).initCapacity(allocator, prefix.len + text.len);
const writer = result.writer();
var pos: usize = 0;
var prefix_pos: usize = std.math.maxInt(usize);