pika-dev
[Top][All Lists]
Advanced

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

[Pika-dev] Re: Pika string work


From: Andreas Rottmann
Subject: [Pika-dev] Re: Pika string work
Date: Thu, 24 Jun 2004 18:41:18 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

[Some more thoughts]

Andreas Rottmann <address@hidden> writes:

>
> Now that udstr is mostly on-line, I've gone back to do a bit ore
> hacking on Pika strings. However, I miss a few functions to mirrored
> at the udstr API:
>
> udstr_make_n -- create new string of given length (in codepoints)
>
It seems this is a bit hairy. I guess you can't use a
non-initialized chunk of memory, at least if the string is in a
variable-size encoding. How would you initialize the string (e.g. with
spaces)?

> udstr_{case,}cmp
>
I just realized that there seem to be no comparision functions in ustr
yet.

> udstr_at/udstr_set
>
Hmm, I imagined an API like

t_unicode udstr_at(udstr str, ustr_cp_index_t n);
t_unicode udstr_set(udstr str, ustr_cp_index_t n, t_unicode c);

But I can't find functions at the ustr level that operate on
codepoints (e.g. there is no ustr_cp_ref()). 

> I could well add those, since they should be simple wrappers, but I'd
> like to have the interface given first, so they come out right.
>
Well, it seems it's not as simple as I first imaged :-), so if I get a
concrete API, I could give it a shot, or I'll leave it to Tom.

Andy
-- 
Andreas Rottmann         | address@hidden      | address@hidden | address@hidden
http://yi.org/rotty      | GnuPG Key: http://yi.org/rotty/gpg.asc
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

life is a sexually transmitted disease




reply via email to

[Prev in Thread] Current Thread [Next in Thread]