java.lang.Object
org.tigris.subversion.svnclientadapter.utils.StringUtils

public class StringUtils extends Object
A helper class for various string operations
  • Constructor Details

    • StringUtils

      public StringUtils()
  • Method Details

    • split

      public static String[] split(String str, char separator)
      we can't use String.split as it is a JDK 1.4 method. //TODO Java 1.4 is not aproblem anymore. Isn't it ?
      Parameters:
      str -
      separator -
      Returns:
      an array of string segments
    • split

      public static String[] split(String str, String separator)
      split using a string separator
      Parameters:
      str -
      separator -
      Returns:
      an array of string segments
    • stripStart

      public static String stripStart(String str, String stripChars)

      Strips any of a set of characters from the start of a String.

      A null input String returns null. An empty string ("") input returns the empty string.

      If the stripChars String is null, whitespace is stripped as defined by Character.isWhitespace(char).

       StringUtils.stripStart(null, *)          = null
       StringUtils.stripStart("", *)            = ""
       StringUtils.stripStart("abc", "")        = "abc"
       StringUtils.stripStart("abc", null)      = "abc"
       StringUtils.stripStart("  abc", null)    = "abc"
       StringUtils.stripStart("abc  ", null)    = "abc  "
       StringUtils.stripStart(" abc ", null)    = "abc "
       StringUtils.stripStart("yxabc  ", "xyz") = "abc  "
       
      Parameters:
      str - the String to remove characters from, may be null
      stripChars - the characters to remove, null treated as whitespace
      Returns:
      the stripped String, null if null String input