strtok

Richard Kreiss rkreiss at gccconsulting.net
Tue Aug 25 10:50:46 PDT 2009


Noted something and I wanted to check if this is the correct behavior.

I am importing data from a csv file and need to edit some of the import
fields as they are not quite right.

One field is a phone # field which can be in the form:

EXT 111

EXT 111 (212) 555-1212

(212) 555-1212

This is in foobar(5)

I can do a if: mid(foobar(5),"1","1") = "E" and this works fine.
		
However if I do d=strtok(foobar(5),"(","1") to get the position of the open
paran, to extract the phone #, d = "0".

Had to do f=foobar(5){"" and then d=strtok(f,"(","1") to get the starting
position to extract the phone #.

Mid on foobar(5) works but apparently strtok on foobar(5) won't work.

Is this the correct behavior?



Richard Kreiss
GCC Consulting
rkreiss at gccconsulting.net
  






More information about the Filepro-list mailing list