I got tired of having misaligned text output, so I implemented a Tab or Comma
Separated String Ruler. This permits placing a JavaScript String into columns.
Attach the String$ruler function to the String object.
String.prototype.ruler = String$ruler;
alert('Hello,World'.ruler('C20,C20')); A =
'123.567 \t 12'; alert(A.ruler('F10.2,F10.2'));
(alert does not use a fixed size font. Do not use for multiple lines, this is why
"popup" is used in the example code tab,
or copy alert text and paste into something with courier font capabilities,
NOTEPAD, WORD, HTML, ...)
Tab or Comma Separated Columns (not case sensitive)
COURIER FONT ONLY
Global Operations, non-positional
Gc
column gutters using "c" character (ie. "G|"), one space before and after
(no text used)
FIT
Truncate all columns when required (no text used)
Spacing Operator, no text is
used
Xn
Skip N Columns before placing a column (no text used)
Column Operators, text is used
Cn
Column width of size N, CENTER justified text
Ln
Column width of size N, LEFT justified text
Rn
Column width of size N, RIGHT justified text
Zn
Column width of size N, leading zero filled text
Dn
Column width of size N, trailing DOT filled text
Fn.m
Column width of size N, convert to a decimal number, RIGHT justified M
decimal places
Column Operators, no text is used (system adds text into
the specified column)
count:fmt
Insert Row Counter here (start from 1) "count:Z6" (' '.ruler() to reset counter)
index:fmt
Insert Row Index here (start from 0) "index:Z6" (' '.ruler() to reset counter)