lua-users home
lua-l archive

Re: Using function 'tokens' with strings

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>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

AltStyle によって変換されたページ (->オリジナル) /