Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The method for alignCenter is checking to see if halfWidth (rather than width) is even. This worked with the existing test case because the container width given is 6 minus string width (2) is 4. Divide that in half and you have an even number. My test case makes the container width 8. So available width is 6. Divide that in half you get an odd number. So the odd logic triggers padding 3 to the left and 4 to the right. This commit fixes the minor defect.
- Loading branch information