how would i go about spliting a string that is stored in a StringList ?

information in string looks like this:

Name
RanK

now i need to split them so i can use a funcation like this

data[0] for Name
and
data[1] for rank

can sumone help me please?
thanks

information in string looks like this:

Name
RanK

From this, I understand that the string looks like Name<CR><LF>Rank (Name#D#ARank). If you want to split it, use Pos and copy functions.

iPos := Pos('#13#10', yourString). 
Name := copy(yourString, 1, iPos-1);
Delete(yourString, 1, iPos + 1); //delete <CR><LF>
//now, yourString stores only the rank

If my supposition is wrong, post your code.

Cheers,
Ionut

how would i go about spliting a string that is stored in a StringList ?

information in string looks like this:

Name
RanK

now i need to split them so i can use a funcation like this

data[0] for Name
and
data[1] for rank

can sumone help me please?
thanks

Delphi-TStringList

This question has already been answered. Start a new discussion instead.