RE: text to number 2
- Posted by Kat <gertie at PELL.NET> Jan 30, 2002
- 421 views
On 31 Jan 2002, at 6:04, dmccu at connect.ab.ca wrote: > > Irv, > > What is strtok.s? "s" ? It's ".e". It's an include that treats "words" or words in a sentence, sequence, data line, etc as entities, separated by things like spaces, commas, semicolons, or whatever you specify. The strtok functions let you do things to words in sentences like you would characters in strings, like reptok(), deltok(), gettok(), etc etc.. So for line = {"Smith","Alice",1234,2002,"xyz45abc"} field1 = gettok(line,1,44) -- 44 is ascii for comma field1 = "Smith" count = numtok(line,44) -- count = 4 so you can pick out words or data fields or tags easily. http://www.rapideuphoria.com/strtok.zip Kat