Java Formatter specify starting position for text
Posted
by purecharger
on Stack Overflow
See other posts from Stack Overflow
or by purecharger
Published on 2010-06-07T21:48:00Z
Indexed on
2010/06/07
21:52 UTC
Read the original article
Hit count: 238
I'm trying to position a string at a certain starting position on a line, regardless of where the previous text ended. For instance:
Mandatory arguments to long options are mandatory for short options too.
-a, --all do not ignore entries starting with .
-A, --almost-all do not list implied . and ..
The explanation of the options begin at position 30 regardless of the text preceding. How do you accomplish this with java.util.Formatter? I have tested with both the width (%30s
) and precision (%.30
) arguments, and neither provide the desired result.
© Stack Overflow or respective owner