Hello all,

following is a patch that corrects the formatting behaviour of the '-' switch if the 
string is longer than the maximum field length.
Current behaviour is the rightmost characters are displayed, as without the '-' switch.
Expected behaviour is the leftmost character are displayed.

--- PatternConverter.java.old   Thu Dec 14 21:06:50 2000
+++ PatternConverter.java       Thu Apr 05 14:39:08 2001
@@ -64,7 +64,12 @@
     int len = s.length();
 
     if(len > max)
-      sbuf.append(s.substring(len-max));
+      if(leftAlign) {
+       sbuf.append(s.substring(0, max));
+      }
+      else {
+       sbuf.append(s.substring(len-max));
+    }
     else if(len < min) {
       if(leftAlign) {  
        sbuf.append(s);


Regards
Frank-Olaf Lohmann



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to