why is it such a difficult task to find a String function to center align my string when left and right align is so simple using Formatter etc.
I want to format my output file
Nodes Expanded
Euclidean Manhattan Chessboard
Input1 2 2 2
Input2 6 6 6
Input3 - - -
pseudocode:
String line1="Nodes Expanded";
line1.center(50); //length of string =50
i can use PrintWriter to the String then.
will i have to build a logic for this or am I not aware of some inbuilt function?