Index indeholder positionen af ';'. Nu kan dun splitte strengen ad.
Help fra CBuilder:
Returns the index at which a specified substring begins.
int __fastcall Pos(const AnsiString& subStr) const;
Description
Pos returns the index in the AnsiString at which the substring subStr begins, where 1 is the index of the first character, 2 is the index of the second character, and so on. If the substring is not contained in the AnsiString, Pos returns 0.
Jeg ved godt at det ikke lige var det der blev spurgt om, men hvis du har en ganske alm (char*)-streng så kan du bruge strtok() til samme formål.
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.