#Convert ArrayList to an array
1 messages · Page 1 of 1 (latest)
1 messages · Page 1 of 1 (latest)
Is there any built-in method to convert ArrayList([]const u8) to [][]const u8 or [] const []const u8 .
One option is to loop over the items and assign them to an array.
Any idea??
.toOwnedSlice()
[]T and []const T are called slices, array is [N]T with N being the length
slices are a pointer, array is the value
You can just do list.items if you still want to keep the list around.