Re: [Clip] Re: Making numbers line up
- Hi Wheeler,
Figured it out,
The problem is that I was using "; " as a list delimiter which added an
extra space to every line but the first one.
Line 27 should be:
^!Set %text%="^$StrReplace("^%NL%";"; ";^%text%;FALSE;FALSE)$"
Also, if the clip were thorough, it would somewhere add a routine to
keep semicolons somewhere in the text from screwing up the format.
> Hi Stephen!
> I tested your clip, it does the job. But the output looks a little
> different with extra space. For Instance:
> I will have to use your clip as a sample for some upcoming
> Good Job!
- Hi Stephen ,
I tested your clip using same file as other tests. 1000 lines
formatted in 25 seconds! Nice job. Using String methods certainly
handles some of the quirks inherent in other methods (after all, they
are strings...) but is is strange to watch the cursor just sit there
while the statusbar does all the work. (ahem..)
I did have several newlines after the last text which did get counted
in the final result, so if an accurate count is needed I suppose they
will need to be trimmed.
The only plausible argument (that I can think of) for presetting the
RightMargin is if large batches of similar data needs to be formatted
consistently over several sets, the longest line in one set may not
be the same as another, or from batch to batch.
Presetting the right limit would keep the output consistent over the
long haul and improve readability, especially if the output pages are
bound, or otherwise collated.
All in all, itsa nice clip that works fine, and I learned some string