Class Strings

java.lang.Object
eu.bandm.tools.util.java.Strings

public class Strings extends Object
Utility class for string manipulation.
  • Field Details

  • Method Details

    • prefix

      public static String prefix(String s, int len, String suffix)
      Deliver the prefix of the given string of the given max length. Append the suffix if the input has been truncated.
    • prefix

      public static String prefix(String s, int len)
      Deliver the prefix of the given string of the given max length. Append the standard_suffix if the input has been truncated.
    • hash32

      public static String hash32(Object o)
      Delivers easily readable String representation.
    • uncapitalize

      public static String uncapitalize(String s)
      Turns the very first character to lower case.
    • capitalize

      public static String capitalize(String s)
      Turns the very first character to upper case.
    • splitByFirst

      public static String[] splitByFirst(String text)
      Takes the very first character as delimiter for splitting the rest of the string. The last character is ignored if it is the delimiter, so no empty sub-string is recognized at the end of the list. Is somehow equivalent to the xslt code splitbyfirst in doctypes/d2d_gp/libbasic.xslt