Suppose that such a piece of code exists:
my $str = 'some text';
my $result = my_subroutine($str);
and my_subroutine()should be implemented as Perl XS code. For example, it can return the sum of bytes of a string (unicode).
Does XS code handle the string (a) char char, as a general method, and (b) byte by byte if the string consists of a subset of ASCII codes (a built-in function to convert string srtucture to char [] from the source data)?
source
share