TheKedge
13th July 2006, 13:21
may sound trivial to many but...
QString thing("");
makes an empty but non-null string
calling clear() on is makes it both empty and null.
I'm sure that's what it's meant to do but does that make sense?
wouldn't be better to have a clear() that empties the string and a reset() to null it?
I recursively use a string, and need it emptied - do I have to empty my string with thing = "";
maybe it's a bit pedantic?
tell me it's pedantic.
thanks
K
QString thing("");
makes an empty but non-null string
calling clear() on is makes it both empty and null.
I'm sure that's what it's meant to do but does that make sense?
wouldn't be better to have a clear() that empties the string and a reset() to null it?
I recursively use a string, and need it emptied - do I have to empty my string with thing = "";
maybe it's a bit pedantic?
tell me it's pedantic.
thanks
K