[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Using function 'tokens' with strings
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 21 Jan 2004 15:23:17 -0200
>It's possible to change the function 'tokens'
>(ltokens.c) to accept strings?
I assume you mean my ltokens library in
http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/
If so, it's simple. You have to simplify the code in utokens not to open
a file but to get a string as the first argument (in the Lua stack). Then
you have to provide a simpler reader function. You can copy getS from
lauxlib.c
Send me a message directly if you have any problems.
--lhf