I didn't commit this directly in case string_ord isn't supposed to be doing what it's doing. (It always seemed kind of odd to me to have a positional ord -- why not call that index? But it's extremely useful.) And I'd have to reread Jarkko's Unicode primer to have any clue whether I'm using the term 'codepoint' correctly.
-- Gimme a job! http://foxglove.dnsalias.org/~sfink/job.html C, perl, networking, performance optimization, Java, XML. Index: string.c =================================================================== RCS file: /home/perlcvs/parrot/string.c,v retrieving revision 1.64 diff -u -r1.64 string.c --- string.c 24 Mar 2002 06:57:28 -0000 1.64 +++ string.c 29 Mar 2002 06:10:42 -0000 @@ -119,7 +119,8 @@ } /*=for api string string_ord - * return the length of the string + * Return the codepoint at a given index into a string. Negative + * indexes are treated as counting from the end of the string. */ INTVAL string_ord(const STRING *s, INTVAL idx)