Package ca.uhn.hl7v2.util
Class StringUtil
java.lang.Object
ca.uhn.hl7v2.util.StringUtil
Various string utility methods
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringRemoves any line separators (\r ot \n) from the end of a string and returns that stringstatic String[]concatenate(String[] array1, String[] array2) static intcountLines(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 itstatic booleanReturnstrueif the string is null, or contains no non-whitespace charactersstatic booleanisNotBlank(String theString) Inverse ofisBlank(String)static StringSearch within a string and replace one substring with another.static voidvalidateNotEmpty(String theValue) Throws an IllegalArgumentException if the value is an empty string or null
-
Constructor Details
-
StringUtil
public StringUtil()
-
-
Method Details
-
countLines
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
Removes any line separators (\r ot \n) from the end of a string and returns that string -
validateNotEmpty
Throws an IllegalArgumentException if the value is an empty string or null -
replace
Search within a string and replace one substring with another. Based on the method within Commons-Lang StringUtils. -
concatenate
-
isBlank
Returnstrueif the string is null, or contains no non-whitespace characters -
isNotBlank
Inverse ofisBlank(String)
-