<-- Previous || Up || Next -->

Squeeze Text Block To Upper Left Function
Formats Justifies Class

Public Function SqueezeTextBlockToUpperLeft( _
      ByVal vText As Variant _
    , Optional ByVal vSeparator As Variant _
    ) As Variant

Squeezes all of the lines of text to the upper left of the string.
Removes all leading blank lines from a string, and removes the leading spaces from all non-blank lines in the string.

Example:
    ? OffsetTextBlock(WrapText(Preamble, 40), 5)
         We the people of the United States, in
         order to form a more perfect union,
         establish justice, insure domestic
         tranquility, provide for the common
         defense, promote the general welfare,
         and secure the blessing of liberty to
         ourselves and our posterity, do ordain
         and establish the Constitution of the
         United States of America.
    ? SqueezeTextBlockToUpperLeft(OffsetTextBlock(WrapText(Preamble, 40), 5))
    We the people of the United States, in
    order to form a more perfect union,
    establish justice, insure domestic
    tranquility, provide for the common
    defense, promote the general welfare,
    and secure the blessing of liberty to
    ourselves and our posterity, do ordain
    and establish the Constitution of the
    United States of America.
See also:
    UnformatLine Function
    OffsetTextBlock Function
    WrapText Function
vText: String containing the lines of text which are to be squeezed to the upper left. Function returns Null if vText is Null or cannot be fixed up to a String.

vSeparator: The string which separates the lines of text in string vText. vSeparator defaults to carriage return and new line characters if it is missing or Null or cannot be fixed up to a String.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.