lastoccurrence
Last occurrence is a concept in computer science and data processing that refers to the final position at which a given value, character, substring, or pattern appears within a sequence. It is commonly applied to strings and arrays, where the goal is to locate the rightmost match rather than the first one.
In practice, last occurrence searches are used to determine where something happens last in a data set.
Computing the last occurrence is typically done by scanning the sequence from the end toward the beginning
Edge cases include situations where the value or pattern does not occur at all, the sequence is
See also: rightmost occurrence, lastIndexOf, rfind, string search.