I don't understand the question. Please explain.
I'm afraid the answer is painstakingly. A text object has more than 100 properties. To find the differences between the style and the text, you have to look at all of those properties. And, you have to take into account the possibility of character styles having been applied either explicitly or implicitly through a nested or grep style.