structstd.coff.FileDefinition[src]

Fields

file_name: [18]u8

An ANSI string that gives the name of the source file. This is padded with nulls if it is less than the maximum length.

Functions

FunctiongetFileName[src]

pub fn getFileName(self: *const FileDefinition) []const u8

Parameters

self: *const FileDefinition

Source Code

Source code
pub fn getFileName(self: *const FileDefinition) []const u8 {
    const len = std.mem.indexOfScalar(u8, &self.file_name, @as(u8, 0)) orelse self.file_name.len;
    return self.file_name[0..len];
}

Source Code

Source code
pub const FileDefinition = struct {
    /// An ANSI string that gives the name of the source file.
    /// This is padded with nulls if it is less than the maximum length.
    file_name: [18]u8,

    pub fn getFileName(self: *const FileDefinition) []const u8 {
        const len = std.mem.indexOfScalar(u8, &self.file_name, @as(u8, 0)) orelse self.file_name.len;
        return self.file_name[0..len];
    }
}