Textfield char width Calculation

I have a movieclip object, in which i create textfields dynamically.

For each line of display i would like to create a text field and display the text. For this i need to know the maximum characters that can fit into the text field for the current formatting of the text field.

Can somebody help ?