Struct goblin::strtab::Strtab [] [src]

pub struct Strtab<'a> { /* fields omitted */ }

A common string table format which is indexed by byte offsets (and not member index). Constructed using parse with your choice of delimiter. Please be careful.

Methods

impl<'a> Strtab<'a>
[src]

[src]

Construct a new strtab with bytes as the backing string table, using delim as the delimiter between entries

[src]

Construct a strtab from a ptr, and a size, using delim as the delimiter

[src]

Parses a strtab from bytes at offset with len size as the backing string table, using delim as the delimiter

[src]

Converts the string table to a vector, with the original delim used to separate the strings

[src]

Safely parses and gets a str reference from the backing bytes starting at byte offset. If the index is out of bounds, None is returned. Requires feature = "alloc"

[src]

Gets a str reference from the backing bytes starting at byte offset. If the index is out of bounds, None is returned. Panics if bytes are invalid UTF-8.

Trait Implementations

impl<'a> Debug for Strtab<'a>
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a> Default for Strtab<'a>
[src]

[src]

Returns the "default value" for a type. Read more

impl<'a> Index<usize> for Strtab<'a>
[src]

The returned type after indexing.

[src]

Gets str reference at starting at byte offset. NB: this will panic if the underlying bytes are not valid utf8, or the offset is invalid

Auto Trait Implementations

impl<'a> Send for Strtab<'a>

impl<'a> Sync for Strtab<'a>