Class StringUtil

java.lang.Object
ca.uhn.hl7v2.util.StringUtil

public class StringUtil extends Object
Various string utility methods
  • Constructor Details

  • Method Details

    • countLines

      public static int countLines(String theString)
      Counts the number of lines in a string by counting the number of "\n" or "\r" or "\r\n" sequences which appear in it
    • chomp

      public static String chomp(String theLine)
      Removes any line separators (\r ot \n) from the end of a string and returns that string
    • validateNotEmpty

      public static void validateNotEmpty(String theValue)
      Throws an IllegalArgumentException if the value is an empty string or null
    • replace

      public static String replace(String theString, String theMatch, String theReplacement)
      Search within a string and replace one substring with another. Based on the method within Commons-Lang StringUtils.
    • concatenate

      public static String[] concatenate(String[] array1, String[] array2)
    • isBlank

      public static boolean isBlank(String theString)
      Returns true if the string is null, or contains no non-whitespace characters
    • isNotBlank

      public static boolean isNotBlank(String theString)
      Inverse of isBlank(String)