[fpc-pascal]Word count function

Marco van de Voort marcov at stack.nl
Thu Sep 6 14:29:04 CEST 2001


> 
> Does anyone know of an efficient method for counting the words in a line of
> data? I've written a few different functions, none of which were terribly
> efficient or accurate. I've check the Contributed Units page, but I don't
> see anything that looks like it might help me. I also checked the sources
> that come with FPC, but unless I'm missing something obvious (which is
> possible) I don't see anything their either.
> 
> Any help would be appreciated. TIA...

Check out xtdfpc on the contributed pages, look into unit EPasStr to the 
"ITEM" functions (item, items, qitem etc).

I don't know how much of that is in compilable state, but you could check the
algoritm of those functions, or copy and paste them to a new unit.





More information about the fpc-pascal mailing list