Quick question - using Strings in typedef structures...

daba:
I can't see how the typedef struct can be a variable length, surely it needs to know the length of the string, which it doesn't until it is "set" when a mismatch occurs.

The String object contains a pointer to some dynamically allocated memory. The object itself has a fixed size - it's the dynamically allocated memory that varies.