String firstElement()
Returns a String containing the element at position zero.
DtpNoElementAtPositionException - If there are no elements.
Elements in the DtpSplitString object are numbered from first to last beginning with zero. Therefore, the first element is at position zero.
The firstElement() method returns the element at position zero but does not change the current element position.
// Create a DtpSplitString object DtpSplitString MyString = new DtpSplitString("This,is a test",", "); // This call returns the first element containing "This" String anElement = MyString.firstElement();