package linksem

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

The string_table module implements string tables. An ELF file may have * multiple different string tables used for different purposes. A string * table is a string coupled with a delimiting character. Strings may be indexed * at any position, not necessarily on a delimiter boundary.

type string_table =
  1. | Strings of char * string

string_table type, represents a string table with a fixed delimiting * character and underlying string.

val dummy_strtab : string_table
val mk_string_table : string -> char -> string_table

mk_string_table base sep constructs a string table using base as the * base string and sep as the delimiting character to use to split base * when trying to access the string stored in the table using the functions below.

val string_table_of_byte_sequence : Byte_sequence_wrapper.byte_sequence -> string_table

string_table_of_byte_sequence seq constructs a string table, using the NUL * character as terminator, from a byte sequence.

val empty0 : string_table

empty is the empty string table with an arbitrary choice of delimiter.

val get_delimiting_character : string_table -> char

get_delimiating_character tbl returns the delimiting character associated * with the string table tbl, used to split the strings.

val get_base_string : string_table -> string

get_base_string tbl returns the base string of the string table tbl.

size tbl returns the size in bytes of the string table tbl.

val concat0 : string_table list -> string_table Error.error

concat xs concatenates several string tables into one providing they all * have the same delimiting character.

val get_string_at : Nat_big_num.num -> string_table -> string Error.error

get_string_at index tbl returns the string starting at character index * from the start of the base string until the first occurrence of the delimiting * character.

val find_string : string -> string_table -> Nat_big_num.num option
val insert_string : string -> string_table -> Nat_big_num.num * string_table
val instance_Show_Show_String_table_string_table_dict : string_table Show.show_class
OCaml

Innovation. Community. Security.