You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
378 B
Zig

const std = @import("std");
pub fn splitArrayIntoArrayList(content: []const u8, char: *const [1:0]u8) !std.ArrayList([]const u8) {
const allocator = std.heap.page_allocator;
var grid = std.ArrayList([]const u8).init(allocator);
var lines = std.mem.split(u8, content, char);
while (lines.next()) |line| {
try grid.append(line);
}
return grid;
}