Java Utililty Methods String Align

List of utility methods to do String Align

Description

The list of methods to do String Align are organized into topic(s).

Method

Stringalign(String key, int n)
align
return align(key, n, "");
StringalignInTwoline(String data)
align In Twoline
String finaldata = "";
String initData = data;
for (int i = 0; i < data.length() / 14; i++) {
    if (initData.length() > 14) {
        finaldata = finaldata + "\n" + initData.substring(0, MAX_ALLOWED_FOR_FIELD);
        initData = initData.substring(MAX_ALLOWED_FOR_FIELD, initData.length() - 1);
finaldata = finaldata + "\n" + initData;
return finaldata.trim();