previous-char-property-change

previous-char-property-change is a built-in function in `C source code'.

(previous-char-property-change POSITION &optional LIMIT)

Return the position of previous text property or overlay change.
Scans characters backward in the current buffer from POSITION till it
finds a change in some text property, or the beginning or end of an
overlay, and returns the position of that.
If none is found since (point-min), the function returns (point-min).

If the optional second argument LIMIT is non-nil, don't search
past position LIMIT; return LIMIT if nothing is found before LIMIT.
LIMIT is a no-op if it is less than (point-min).