package core:text/table
⌘K
Ctrl+K
or
/
Index
Types (3)
Constants (0)
This section is empty.
Variables (0)
This section is empty.
Procedures (25)
- build
- caption
- destroy
- first_row
- format
- get_cell
- header
- header_row
- init_with_allocator
- init_with_mem_arena
- init_with_virtual_arena
- last_row
- padding
- row
- set_cell_alignment
- set_cell_value
- set_cell_value_and_alignment
- stdio_writer
- strings_builder_writer
- write_ascii_table
- write_byte_repeat
- write_html_table
- write_markdown_table
- write_table_cell
- write_text_align
Procedure Groups (1)
Types
Cell_Alignment ¶
Cell_Alignment :: enum int { Left, Center, Right, }
Related Procedures With Parameters
Table ¶
Table :: struct { lpad, rpad: int, // Cell padding (left/right) cells: [dynamic]Cell, caption: string, nr_rows, nr_cols: int, has_header_row: bool, table_allocator: runtime.Allocator, // Used for allocating cells/colw format_allocator: runtime.Allocator, // Used for allocating Cell.text when applicable dirty: bool, // The following are computed on build() colw: [dynamic]int, // Width of each column (including padding, excluding borders) tblw: int, }
Related Procedures With Parameters
- build
- caption
- destroy
- first_row
- format
- get_cell
- header
- header_row
- init_with_allocator
- init_with_mem_arena
- init_with_virtual_arena
- last_row
- padding
- row
- set_cell_alignment
- set_cell_value
- set_cell_value_and_alignment
- write_ascii_table
- write_html_table
- write_markdown_table
- write_table_cell
- init (procedure groups)
Constants
This section is empty.
Variables
This section is empty.
Procedures
format ¶
format :: proc(tbl: ^Table, _fmt: string, args: ..any, loc := #caller_location) -> string {…}
get_cell ¶
get_cell :: proc(tbl: ^Table, row, col: int, loc := #caller_location) -> ^Cell {…}
header ¶
header :: proc(tbl: ^Table, values: ..any, loc := #caller_location) {…}
init_with_allocator ¶
init_with_allocator :: proc(tbl: ^Table, format_allocator := context.temp_allocator, table_allocator := context.allocator) -> ^Table {…}
init_with_mem_arena ¶
init_with_mem_arena :: proc(tbl: ^Table, format_arena: ^mem.Arena, table_allocator := context.allocator) -> ^Table {…}
init_with_virtual_arena ¶
init_with_virtual_arena :: proc(tbl: ^Table, format_arena: ^mem_virtual.Arena, table_allocator := context.allocator) -> ^Table {…}
row ¶
row :: proc(tbl: ^Table, values: ..any, loc := #caller_location) {…}
set_cell_alignment ¶
set_cell_alignment :: proc(tbl: ^Table, row, col: int, alignment: Cell_Alignment, loc := #caller_location) {…}
set_cell_value ¶
set_cell_value :: proc(tbl: ^Table, row, col: int, value: any, loc := #caller_location) {…}
set_cell_value_and_alignment ¶
set_cell_value_and_alignment :: proc(tbl: ^Table, row, col: int, value: string, alignment: Cell_Alignment) {…}
stdio_writer ¶
stdio_writer :: proc() -> io.Stream {…}
write_markdown_table ¶
Renders table according to GitHub Flavored Markdown (GFM) specification
write_text_align ¶
write_text_align :: proc( w: io.Stream, colw, lpad, rpad: int, text: string, alignment: Cell_Alignment, ) {…}
Procedure Groups
init ¶
init :: proc{ init_with_allocator, init_with_virtual_arena, init_with_mem_arena, }
Source Files
Generation Information
Generated with odin version dev-2023-10 (vendor "odin") Windows_amd64 @ 2023-10-03 21:09:46.584274100 +0000 UTC