If your routine is to be used heavily there is a much faster way to do
left justifications.  It is to use a TRTE with a 256-byte table that
defines only a blank, x'40', as a licit character.  This approach
yields the zero-origin offset of the leftmost non-blank directly.

If I were writing such a routine, as I did long ago, I would also give
it an additional entry point for right justification, which can [now]
be accomplished using the same approach [and the same table] but using
a TRTRE instead of a TRTE.

I agree 'philosophically' with most of what Bill wrote; but
single-character-by-single-character operations on strings are, I
think, not just tedious but ugly where better approaches are
available.

John Gilmore, Ashland, MA 01721 - USA

Reply via email to