Using this code as an example
Code: Select all
input:
pct (14.5),
ytvol (21563),
tvol (156874),
nubar (45);
Plot1((NumToStr(pct,1) + "%" + spaces(4)
+ NumToStr(ytvol,0) + spaces(4)
+ NumToStr(tvol,0) + spaces(4)
+ NumToStr(nubar,0) + spaces(4)
+ FormatTime("HH:mm", datetime) + "h"));
Looking a the bottom part of the attached image, we have a perfect aligned text. This is normal since all strings have the same length.
The problem is with the top part of the image where we have strings with different lengths which difficult the way we read the information. Our eyes need to zig-zag between the data.
My question is how can we align strings with different lengths so the final result be something like the bottom part of the image?
I know there's a keyword STRLEN that should help in this case but I have no idea on how to apply it.
The idea would be to read the highest string length and then "plot" that length into the other strings, but how to do that?