I am making my custom implementation of DefaultStyledDocument. And sometimes, I need to know how many characters will be (or has been) inserted by the Document.insertString() method.
But I did not find how to compute it. (The method insertString() itself can't help me as it returns void).
So is it possible to compute this value ?
Thanks in advance.
Can you use the length() method? i.e.:
String s = "Example";
int len = s.length();