Skip to documentation
SLOP

tiny.tldr.formats.elf.string

Reference tiny.tldr formats elf string

Defined in formats.elf.

API (5)

Actions

Public operations.

Types and contracts

Public types and contracts.

No direct callersNo direct callsformats.elfstring
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: lib/tldr/src/formats/elf/root.zig:25

zig
pub const string = @import("string.zig");

Source: lib/tldr/src/formats/elf/string.zig

zig
const std = @import("std");const Allocator = std.mem.Allocator;pub const Table = struct {    data: std.ArrayListUnmanaged(u8) = .empty,    pub fn init(allocator: Allocator) Allocator.Error!Table {        var table = Table{};        try table.data.append(allocator, 0);        return table;    }    pub fn deinit(self: *Table, allocator: Allocator) void {        self.data.deinit(allocator);    }    pub fn add(self: *Table, allocator: Allocator, value: []const u8) Allocator.Error!u32 {        const offset: u32 = @intCast(self.data.items.len);        try self.data.appendSlice(allocator, value);        try self.data.append(allocator, 0);        return offset;    }    pub fn bytes(self: Table) []const u8 {        return self.data.items;    }};

Audit

Definitions6
Public names6
Members1
Version26.7.0
Revisiondaab053ee433