Logo Search packages:      
Sourcecode: icu version File versions  Download package

int32_t SearchIterator::last ( UErrorCode status  )  [inherited]

Returns the last index in the target text at which it matches the search pattern. The iterator is adjusted so that its current index (as returned by getOffset) is the match position if one was found. If a match is not found, USEARCH_DONE will be returned and the iterator will be adjusted to the index USEARCH_DONE.

Parameters:
status for errors if it occurs
Returns:
The index of the first match, or USEARCH_DONE if there are no matches.
See also:
getOffset ICU 2.0

Definition at line 217 of file search.cpp.

References SearchIterator::handlePrev(), SearchIterator::m_search_, SearchIterator::setOffset(), U_FAILURE, and USEARCH_DONE.

{
    if (U_FAILURE(status)) {
        return USEARCH_DONE;
    }
    setOffset(m_search_->textLength, status);
    return handlePrev(m_search_->textLength, status);
}


Generated by  Doxygen 1.6.0   Back to index