Bom, tenho a seguinte função em Delphi :

Código:

var
AllStrings, packet, packet2: string;
begin
  AllStrings := 'test|testpacket2|;

  packet := Copy(AllStrings, 0, Pos('|', AllStrings) - 1);

  AllStrings := Copy(AllStrings, Pos('|', AllStrings) + 1, Length(AllStrings));
  packet2 := Copy(AllStrings, 0, Pos('|', AllStrings) - 1);

showmessage('packet =  '+packet+' , packet2 = '+packet2);

sobre : essa função copia as letras antes e depois dos delimitadores.
tem algum modo de fazer essa mesma função em c++?