DtpSplitString class

The DtpSplitString class provides a way to split or parse a string into tokens and retrieve the results. This class is useful for manipulating formatted strings such as composite keys, dates, or telephone numbers.

DtpSplitString is similar to the StringTokenizer class in the java.util package. However, when working with IBM WebSphere InterChange Server Express maps, DtpSplitString provides these advantages over StringTokenizer:

Table 103 summarizes the methods in the DtpSplitString class.

Table 103.

DtpSplitString method summary
Method Description Page
DtpSplitString() Constructs a new instance of DtpSplitString and parses a string into tokens. DtpSplitString()
elementAt() Returns an element in the DtpSplitString object at the position you specify. elementAt()
firstElement() Returns the element in the DtpSplitString object at position zero. firstElement()
getElementCount() Returns an integer containing the total number of elements. getElementCount()
getEnumeration() Returns an Enumeration of String objects where each String is one of the parsed tokens. getEnumeration()
lastElement() Returns the last element in the DtpSplitString object. lastElement()
nextElement() Returns the next element in the DtpSplitString object. nextElement()
prevElement() Returns the previous element in the DtpSplitString object. prevElement()
reset() Resets the current position number in the DtpSplitString object to zero. reset()

Copyright IBM Corp. 2003