imx.lib.varia
Class StringUtil

java.lang.Object
  extended by imx.lib.varia.StringUtil

public class StringUtil
extends java.lang.Object

Util contains some support methods that have no other place to go


Constructor Summary
StringUtil()
           
 
Method Summary
static java.lang.String connectLines(java.lang.String strA, java.lang.String strB)
          connects the lines of strB to strA, so that strB will print to the right of strA, if strA consists of multiple lines.
static java.lang.String fieldTrimLeft(java.lang.String msg, int fieldSize)
          adds empty spaces to the right of msg, so that the total size is fieldSize
static java.lang.String fieldTrimRight(java.lang.String msg, int fieldSize)
          adds empty spaces to the left of msg, so that the total size is fieldSize
static java.lang.String getClassName(java.lang.Object obj)
          Returns the last part of the class name of an object.
static java.lang.String getClassName(java.lang.String fullClassName)
          Returns the last part of the full qualified class name.
static int getMaxLineWidth(java.lang.String str)
          returns the length of longest line in str
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtil

public StringUtil()
Method Detail

main

public static void main(java.lang.String[] args)

fieldTrimRight

public static java.lang.String fieldTrimRight(java.lang.String msg,
                                              int fieldSize)
adds empty spaces to the left of msg, so that the total size is fieldSize


fieldTrimLeft

public static java.lang.String fieldTrimLeft(java.lang.String msg,
                                             int fieldSize)
adds empty spaces to the right of msg, so that the total size is fieldSize


connectLines

public static java.lang.String connectLines(java.lang.String strA,
                                            java.lang.String strB)
connects the lines of strB to strA, so that strB will print to the right of strA, if strA consists of multiple lines.


getMaxLineWidth

public static int getMaxLineWidth(java.lang.String str)
returns the length of longest line in str


getClassName

public static java.lang.String getClassName(java.lang.Object obj)
Returns the last part of the class name of an object.


getClassName

public static java.lang.String getClassName(java.lang.String fullClassName)
Returns the last part of the full qualified class name.