[linux] is strtok niet kosher?

Hans Paijmans j.j.paijmans op uvt.nl
Di Nov 8 13:49:27 CET 2005


Gegeven de string "91-1;wst;ezin;C;IA;120;168;N;;IA1-0001;/+"
zie ik tot mijn ergernis dat het bekende loopje

  s=strtok(string,";");
  while (s) do {printf("%s ",s);s=strtok(NULL,";");}

de lege string tussen de twee puntkommas overslaat.

Weet Linus dat???

-- 
Dr. J.J. Paijmans
Rijksdienst Oudheidkundig Bodemonderzoek                  033-4227591
Maastricht University: IKAT, Faculty of General Sciences  043-3883477
Tilburg University: Dept. of Linguistics & AI             013-4662693
Home: Elzenstraat 1, Waalre,                              040-2230680
http://pi0959.kub.nl   http://paijmans.net       GSM: +31 621 961 083





More information about the Linux mailing list