If it would work of what you have in mind you could put an ending character to enable you to calculate its size.
In most cases tracking the size would be the best way though. Since it is easy and...