有没有办法对齐很长的文本?
例如此代码:
System.out.println("\tHi this is a very long string to test the automated newline but I want to have the newline to be tab indented too.");
而不是下面
Hi this is a very long string to test the automated newline but I want to
have the newline to be tab indented too.
我要这个
Hi this is a very long string to test the automated newline but I want to
have the newline to be tab indented too.
所以,我希望换行符与第一句话对齐。是否存在任何库或默认的 String Java 方法?