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

U_STABLE int32_t U_EXPORT2 usearch_getMatchedStart ( const UStringSearch strsrch)

Returns the index to the match in the text string that was searched. This call returns a valid result only after a successful call to usearch_first, usearch_next, usearch_previous, or usearch_last. Just after construction, or after a searching method returns USEARCH_DONE, this method will return USEARCH_DONE.

Use usearch_getMatchedLength to get the matched string length.

Parameters:
strsrchsearch iterator data struct
Returns:
index to a substring within the text string that is being searched.
See also:
usearch_first
usearch_next
usearch_previous
usearch_last
USEARCH_DONE ICU 2.4

Definition at line 2884 of file usearch.cpp.

References USEARCH_DONE.

{
    if (strsrch == NULL) {
        return USEARCH_DONE;
    }
    return strsrch->search->matchedIndex;
}

Generated by  Doxygen 1.6.0   Back to index