Format fixed-format text file lines

Posted by EugeneP on Stack Overflow See other posts from Stack Overflow or by EugeneP
Published on 2010-04-26T10:20:33Z Indexed on 2010/04/26 10:23 UTC
Read the original article Hit count: 355

Filed under:
|
|

there's a text file

first second third
1 2 3
yes no ok
hmmmmmmm yep_a_long_word_it_is ahahahahahahha

what java functions /libs to use to align words so that they are looked like this (fixed width based on the longest column's length), let's say center align:

  first          second            third
    1              2                 3
    yes            no                ok
hmmmmmmm yep_a_long_word_it_is ahahahahahahha

© Stack Overflow or respective owner

Related posts about java

Related posts about string