DoxigAlpha

printString

Function parameters

Parameters

#
wip:*Wip
fmt:[]const u8
args:anytype

Type definitions in this namespace

Types

#
ErrorMessageList
There will be a MessageIndex for each len at start.
SourceLocation
Trailing:
ErrorMessage
Trailing:

Functions in this namespace

Functions

#
nullTerminatedString
Given an index into `string_bytes` returns the null-terminated string found there.

Special encoding when there are no errors.

Values

#
empty
Special encoding when there are no errors.

Source

Implementation

#
pub fn printString(wip: *Wip, comptime fmt: []const u8, args: anytype) Allocator.Error!String {
    const gpa = wip.gpa;
    const index: String = @intCast(wip.string_bytes.items.len);
    try wip.string_bytes.print(gpa, fmt, args);
    try wip.string_bytes.append(gpa, 0);
    return index;
}