I debugged today the columns no aligning OK on displaying a table, and found that the problem boiled down to the behaviour of lpad. Say I am using
lpad to pad the titles of columns to width 5.
julia> textwidth(s) 1 julia> textwidth(lpad(s,5)) 4
s is not padded enough! This is according to the specification of
lpad which works in terms of
julia> length(s) 2
But I feel that this makes
lpad not the right function for padding. My questions are:
- Is this a known problem?
- Could this be changed in the future?
- Are there circumstances where you want
lpadto use codepoints instead of textwidth?