lua-users home
lua-l archive

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


hi again

On Wed, Nov 29, 2006 at 09:41:50PM +0000, David Given wrote:
> Well, my application is a text editor, so the main thing I need is the ability
> to do string slicing, substitution, pattern matching etc on UTF-8 strings
> reasonably quickly, using character offsets throughout. In fact, the one thing
> I *don't* want to do is to transcode from one encoding to another, so iconv
> doesn't help me.
slnunicode does everything string does,
counting either characters or graphemes,
at reasonable overhead (IIRC a factor 2 to 3 or so slower)
http://luaforge.net/projects/sln/

> It'd also be nice to have an interface to the Unicode character class tables
> so I can determine if a particular character is whitespace, double-width, etc,
> but that's not particularly crucial --- for the western text that the app is
> aimed at, I can use hard-coded tables.
the full character class table is built in to support class based matching.
Would not be difficult to expose it more directly.


cheers