[perl #55712] [PATCH] Some refactoring, cleaning, and pdd28 accommodation of the parrot string subsystem
James Keenan via RT
parrotbug-followup at parrotcode.org
Fri Feb 6 01:12:12 UTC 2009
On Thu Jun 12 15:31:40 2008, julianalbo wrote:
> This patch adds the functions Parrot_string_length and
> Parrot_string_byte_length described in pdd28 and uses them instead of
> string_length in a lot of places. Also modifies the string_length and
> string_compute_strlen to give them his intended meaning, to help
> transition. Also makes some cleaning in encoding related parts.
>
> The intention is to start approaching to pdd28, and make easier later
> steps in that direction.
>
I see that there has been some renaming of functions in pdd28 since this
patch was originally proposed:
441 =head3 Parrot_str_length (was string_compute_strlen)
442
443 Returns the number of characters in the string. Combining characters
are eac h
444 counted separately. Variable-width encodings may lookahead.
445
446 =head3 Parrot_str_grapheme_length
447
448 Returns the number of graphemes in the string. Groups of combining
character s
449 count as a single grapheme.
450
451 =head3 Parrot_str_byte_length (was string_length)
452
453 Returns the number of bytes in the string. The character width of
454 variable-width encodings is ignored. Combining characters are not
treated an y
455 differently than other characters. This is equivalent to accessing the
456 C<strlen> member of the C<STRING> struct directly.
Should we still be considering the patch?
Thank you very much.
kid51
More information about the parrot-dev
mailing list