Print the selected string to the stream, breaking into lines and then wrapping and justifying those lines as necessary.
str is broken into one or more lines that are no more than thisLineLength characters in length. If thisLineLength is zero (0), then this method uses the value of ATextOutputStream.lineLength instead.
str is broken into lines only where the characters specified by breakCharacters are encountered within the string. The default characters in tosWrapDefaultBreakCharacters can be used if the caller does not wish to specify other characters. In any case, breakCharacters should contain ASCII or UTF-8 encoded characters. Only the first such character from each element in breakCharacters is used; if the strings in breakCharacters contain more than one character, the extraneous characters are ignored.
The first line that is printed is padded on the left by a repeating sequence of the characters specified by padCharacter , which should contain an ASCII or UTF-8 encoded character. Only the first such character from padCharacter is used; if it contains others, they are ignored. The number of times padCharacter is used for the first line is determined by firstLineStartColumn ; if that value is zero, then the first line is not padded.
The remaining lines that are printed are padded on the left by the same repeating sequence of characters specified by padCharacter . The number of times padCharacter is used for each remaining line is determined by remainingLinesStartColumn ; if that value is zero, the remaining lines are not padded.
If padCharacter is an empty string, the value specified by tosWrapDefaultPadCharacter is used.
For more information on the various parameters accepted by this routine, see AStringList.wrapString.
Returns
The total number of bytes printed to the stream. If str is an empty string, this method does nothing and returns zero (0). |