Update README.md

This commit is contained in:
seleznevae 2018-05-07 21:19:53 +03:00 committed by GitHub
parent 83896ce9af
commit 5a7096e458
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
**libfort** - a simple library to create formatted ACII tables. **libfort** - a simple library to create formatted ASCII tables.
**Features:** **Features:**
- Easy to integrate (only 2 files: **fort.c** and **fort.h** from **lib** direrctory) - Easy to integrate (only 2 files: **fort.c** and **fort.h** from **lib** direrctory)
@ -15,6 +15,24 @@
- Support of multiple lines in cells - Support of multiple lines in cells
- Support of wide characters - Support of wide characters
## Example
```C
ft_table_t *table = ft_create_table();
ft_set_cell_option(table, 0, FT_ANY_COLUMN, FT_COPT_ROW_TYPE, FT_ROW_HEADER);
ft_write_ln(table, "Rank", "Title", "Year", "Rating");
ft_write_ln(table, "1", "The Shawshank Redemption", "1994", "9.5");
ft_write_ln(table, "2", "12 Angry Men", "1957", "8.8");
ft_write_ln(table, "3", "2001: A Space Odyssey", "1968", "8.5");
ft_write_ln(table, "4", "Blade Runner", "1982", "8.1");
printf("%s\n", ft_to_string(table));
ft_destroy_table(table);
```
Output:
## Supported platforms and compilers ## Supported platforms and compilers