lua-users home
lua-l archive

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


Klaus Ripke <paul-lua@malete.org> writes:

> On Thu, Apr 26, 2007 at 01:09:12PM +0200, David Kastrup wrote:
>> Please note that slnunicode does not really procure strings where the
>> atomic elements are Unicode characters: string indices and similar
>> things are always byte-based.
> nope

The only documentation I have been able to find is in "unitest", and
it is very, very sketchy.

I quote from it:

--	NOTE: find positions are in bytes for all ctypes!
--	use ascii.sub to cut found ranges!
--	this is a) faster b) more reliable

It does not exactly sound like character-based indexing to me.

>> I am more worried about the indexing and atomicity of string
>> characters.  For the programmer, no model except a packed array of
>> unicode-characters makes sense.
>> 
>> As soon as you have to continuously worry about byte counts instead
>> of character counts, the complexity of the programming model
>> explodes.
> I see, but no problem, slnunicode string functions operate on characters,
> not bytes.

Then it would appear that even the little information I had imagined
myself to glean from its documentation is wrong.

-- 
David Kastrup