template<class CharType>
struct StringWithLength
{
size_t length;
CharType* str_buf;
};
I want to add some comments on the field length. I have two choices:
#1. "The field length is the size of str_buf by the byte"
(Consider "The worker is paid by the hour")
#2. "The field length is the size of str_buf in bytes"
Which is more natural from the viewpoint of a native English speaker?
Thanks.
I wouldn’t use either. I’d say something like:
The field itself isn’t “represented in bytes” any more than all data in a computer is. It’s the buffer size (or text size, or whatever) which is in bytes.