Skip to content
New issue

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

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

Already on GitHub? # to your account

Missing $pad_type in Colors::pad() (str_pad) #121

Closed
urlund opened this issue Oct 2, 2017 · 0 comments
Closed

Missing $pad_type in Colors::pad() (str_pad) #121

urlund opened this issue Oct 2, 2017 · 0 comments

Comments

@urlund
Copy link
Contributor

urlund commented Oct 2, 2017

Trying to align numbers to the right in a cli table, but STR_PAD_LEFT seems to be missing.

Current ASCII table creates:

+----+------+---------+
| ID | Name | Balance |
+----+------+---------+
| 3  | Foo  | 10,00   |
| 10 | Bar  | 1200,00 |
+----+------+---------+
|    |      | 1210,00 |
+----+------+---------+

What I want is:

+----+------+---------+
| ID | Name | Balance |
+----+------+---------+
|  3 | Foo  |   10,00 |
| 10 | Bar  | 1200,00 |
+----+------+---------+
|    |      | 1210,00 |
+----+------+---------+

But Colors::pad() while extending ACSII table padColum does not have the possibility to provide STR_PAD_RIGHT or STR_PAD_LEFT based on the $column number.

Fixed in PR: #120

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants