Re:Why is strlen so complex in C?
by user5994461 on Monday August 26, 2019 @06:22PM
(#20804360)
If you mean string as in text string, it's not done and I doubt it could ever be achieved in C++. It's too complicated because of unicode and string encoding aspects.
The new type wouldn't be usable either, because it would have to be converted down to another representation all the time when calling functions and libraries that are not aware of it. Think of C string to C++ string to boost string to whatever.
I think the closest usable thing is QString if you are using Qt.
The new type wouldn't be usable either, because it would have to be converted down to another representation all the time when calling functions and libraries that are not aware of it. Think of C string to C++ string to boost string to whatever.
I think the closest usable thing is QString if you are using Qt.