Package org.dellroad.hl7
Class HL7Util
- java.lang.Object
-
- org.dellroad.hl7.HL7Util
-
public final class HL7Util extends Object
Utility methods.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int[]find(String value, char sep)Convenience method.static int[]find(String value, char sep, int start)Convenience method.static int[]find(String value, char sep, int start, int end)Find all occurrences of the separator character in the sub-string.
-
-
-
Method Detail
-
find
public static int[] find(String value, char sep)
Convenience method. Equivalent to:find(value, sep, 0, value.length())- Parameters:
value- string to searchsep- separator character to search for- Returns:
- separator occurrences
-
find
public static int[] find(String value, char sep, int start)
Convenience method. Equivalent to:find(value, sep, start, value.length())- Parameters:
value- string to searchsep- separator character to search forstart- starting offset invalue- Returns:
- separator occurrences
-
find
public static int[] find(String value, char sep, int start, int end)
Find all occurrences of the separator character in the sub-string.- Parameters:
value- entire stringsep- separator character to search forstart- starting index of sub-string to search (inclusive)end- ending index of sub-string to search (exclusive)- Returns:
- indexes of all occurrences of
sep, in order, plus one extra index equal toend - Throws:
StringIndexOutOfBoundsException- ifstartis less than zero orendis greater than the length ofvalue
-
-