Strings
Roberto Alsina
ralsina at unl.edu.ar
Wed Feb 9 16:32:26 GMT 2000
On Wed, 9 Feb 2000, Saar Gross wrote:
> Hi,
>
> I have a little question about strings:
> I want to take a piece of a string and put it in a new variable.
>
> QString file_info = "-rw-rw-r-- 1 saar saar 11 Jan 5 22:00 somefile.txt";
>
> I want to take "-rw-rw-r--" (For example) and put it in a new variable.
>
> How can I do that ?
Just like the examples in the Qt's QString help file say? ;-)
QString a_piece=file_info.left(10);
should do.
("\''/").__..-''"`-. . Roberto Alsina
`9_ 9 ) `-. ( ).`-._.`) ralsina at unl.edu.ar
(_Y_.)' ._ ) `._`. " -.-' Centro de Telematica
_..`-'_..-_/ /-'_.' Universidad Nacional del Litoral
(l)-'' ((i).' ((!.' Santa Fe - Argentina
KDE Developer (MFCH)
The stone age didn't end for a lack of stone" Firoz Rasul
More information about the KDevelop
mailing list