|
Hello,
I've tried with "strtok" but sometimes it fails because when some field is missing (and there are two pipes), the tokenizer skip to next field.
Please read the following message from the archives, where I present my own utility for this:
http://archive.midrange.com/rpg400-l/200408/msg00372.htmlYou might be interested in reading the whole thread (click Indexes / Thread Index at the top) to see the entire discussion.
I've tried to write my own code with %scan but it is very slow.
I can't say that I've done any benchmarks, but I've never had any problems with performance doing something like this. If performance is really so crucial, maybe you should look into using memchr() instead of %scan().
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.