Qt4-preview-feedback Archive, April 2007
Problem with QString::SkipEmptyParts
Message 1 in thread
The problem is: by default, I never get an empty list:
QString tmp;
QString files = tmp.split(":");
if( files.empty() )
...
never happens because QString::SkipEmptyParts is not set, so at least one
empty string is within. Is that a bug or a feature?
To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx
Message 2 in thread
J. Preiss wrote:
> The problem is: by default, I never get an empty list:
>
> QString tmp;
> QString files = tmp.split(":");
> if( files.empty() )
> ...
>
> never happens because QString::SkipEmptyParts is not set, so at least one
> empty string is within. Is that a bug or a feature?
>
The default argument is QString::KeepEmptyParts and hence you get a
empty string in the list.
Girish
To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx