ca.uhn.hl7v2.util
Class StringUtil

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

public class StringUtil
extends Object

Various string utility methods


Constructor Summary
StringUtil()
           
 
Method Summary
static String chomp(String theLine)
          Removes any line separators (\r ot \n) from the end of a string and returns that string
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
static String replace(String theString, String theMatch, String theReplacement)
          Search within a string and replace one substring with another.
static void validateNotEmpty(String theValue)
          Throws an IllegalArgumentException if the value is an empty string or null
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtil

public StringUtil()
Method Detail

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.



Copyright © 2001-2012 University Health Network. All Rights Reserved.