You could monitor the string for changes by comparing it to the last version and when the change occurs, deposit it into a FIFO buffer, then re-establish the changed string as the "Last" string.
I would create a UDT with the string and a date/time stamp, and use that as the entry into the FIFO.