Manipulating String Perl SV in C

I'm currently trying to do some string-based manipulations, trying to speed up the section of traditional Perl code. The original Perl code looks like

my $value = 'abCdE'; my $uc_value = uc($value); 

I looked at the Perl guts API and it seems that I can accomplish this using toUPPER() , but it works on one char at a time. It seems I am missing how you can scroll the char swap array by squeezing each letter and then assigning it to a new SV.

Any help is greatly appreciated.

+4
source share
1 answer

Perl does not provide much of its functionality to C-level extensions; uppercase appears to be one of these functions. At best, you can see how the kernel implements this, but it's really not all that beautiful.

+2
source

All Articles