DoxigAlpha

appendWriteFixed

Deprecated in favor of print or std.io.Writer.Allocating.

Function parameters

Parameters

#
self:*Self
m:[]const u8

Deprecated.

Functions

#
Managed
Deprecated.
AlignedManaged
Deprecated.
Aligned
A contiguous, growable list of arbitrarily aligned items in memory.

Source

Implementation

#
fn appendWriteFixed(self: *Self, m: []const u8) error{OutOfMemory}!usize {
    const available_capacity = self.capacity - self.items.len;
    if (m.len > available_capacity)
        return error.OutOfMemory;

    self.appendSliceAssumeCapacity(m);
    return m.len;
}