Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to set the character for the padding #81

Closed
zhiburt opened this issue Mar 12, 2022 · 1 comment
Closed

Add an option to set the character for the padding #81

zhiburt opened this issue Mar 12, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@zhiburt
Copy link
Owner

zhiburt commented Mar 12, 2022

Currently the default character we use is a space character .

The idea is to set this character to a custom character.

let indent = tabled::Indent::new(0, 0, 1, 1).set_padding_char('V', '^', '<', '>');
│vvvvvvvvvvvvvvv│vvvvvvvvvvvvvvv│
│> row 1 col 1 <│> row 1 col 2 <│
│^^^^^^^^^^^^^^^│^^^^^^^^^^^^^^^│

The name of the function is not perfect.
Please if you have a better idea use it.

The changes must be done in Indent structure and in papergrid::Settings.


inspired by the same logic in https://github.com/vdmeer/asciitable

@zhiburt
Copy link
Owner Author

zhiburt commented Mar 22, 2022

done in #85

@zhiburt zhiburt closed this as completed Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant