How to get table exact field string size ??

My Code is below:

edtString is AxEdtString edtString;

now it currently returns 10, if this code for example hits code to lookup string size in field itself, if it hits the code to check edt string size if edt is available for example from table field SelfHealingOpportunity.ClassName it gives 120, while on this field i see its 81 string size, i need to get the value - 81, instead of 120, but both these codes below dont return 81, they either return 10 or 120,

if (tableFieldStrLen)
{
    if(tableFields.getObject(i1) is AxTableFieldString)
    {
        AxTableFieldString fieldString = tableFields.getObject(i1);

        if(!fieldString.ExtendedDataType)
        {
            conForExport    = conIns(conForExport, conLen(conForExport)+1, fieldString.StringSize);
        }
        else
        {
            edtString =  Microsoft.Dynamics.Ax.Xpp.MetadataSupport::GetEdt(fieldString.ExtendedDataType);

            conForExport    = conIns(conForExport, conLen(conForExport)+1, edtString.StringSize);
        }
    }
}

If you’re saying that the EDT in AOT has the StringSize 81 but the metadata class says that the effective value is 120, it may mean that 120 is set by an EDT extension.

By the way, you can also test what is the effective string size of the table field (by trying to set a long string there).