get_occurrence_position


Description:

[ Version ( since = "3.10" ) ]
public int get_occurrence_position (TextIter match_start, TextIter match_end)

Gets the position of a search occurrence.

If the buffer is not already fully scanned, the position may be unknown, and -1 is returned. If 0 is returned, it means that this part of the buffer has already been scanned, and that match_start and match_end don't delimit an occurrence.

Parameters:

this

a SourceSearchContext.

match_start

the start of the occurrence.

match_end

the end of the occurrence.

Returns:

the position of the search occurrence. The first occurrence has the position 1 (not 0). Returns 0 if match_start and match_end don't delimit an occurrence. Returns -1 if the position is not yet known.