strtoks upgrades
- Posted by Kat <KSMiTH at PELL.NET> Dec 31, 1999
- 554 views
Heys all, For bug fixes, make parse() in strtoks.e start like this: global function parse(sequence s, integer c) -- parse string s based on delimiter c into a sequence of values sequence list, doublec integer prev, curr doublec = c & c while match(doublec,s) do s = s[1..match(doublec,s)] & s[match(doublec,s)+2..length(s)] end while etc..... `Cause: 1) parse(s,32) was returning {32,32} as a token {}. 2) i changed string_type and char to sequence and integer because i didn't wish to limit what the function can accept, in irc i parse based on "!" and "@" a lot, and i may wish to parse(s,13) someday, to break paragraphs out of files. Sorry i didn't catch these earlier, i was really busy the week i sent the .zip to RDS. If you spot any other bugs, send me a note.Kat