diff options
author | Father Chrysostomos <sprout@cpan.org> | 2014-10-17 22:32:23 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2014-10-18 09:56:28 -0700 |
commit | 20c88bf7facccf1de86d055e8b89eacf898319a4 (patch) | |
tree | f575b4322b85ce40478cde8cceba152f21b040f2 /sv.c | |
parent | 656281663fc2dc3f94e352fa9ff54e8bfd41e899 (diff) | |
download | perl-20c88bf7facccf1de86d055e8b89eacf898319a4.tar.gz |
Apify SV_CATBYTES and SV_CATUTF8
When I added them I was not sure at the time whether they would be
stable or whether they might need to be changed. They seem pretty
stable now, and they are extremely useful, so make them part
of the API.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -5387,8 +5387,14 @@ Handles 'get' magic, but not 'set' magic. See C<sv_catpvn_mg>. =for apidoc sv_catpvn_flags Concatenates the string onto the end of the string which is in the SV. The -C<len> indicates number of bytes to copy. If the SV has the UTF-8 -status set, then the bytes appended should be valid UTF-8. +C<len> indicates number of bytes to copy. + +By default, the string appended is assumed to be valid UTF-8 if the SV has +the UTF-8 status set, and a string of bytes otherwise. One can force the +appended string to be interpreted as UTF-8 by supplying the C<SV_CATUTF8> +flag, and as bytes by supplying the C<SV_CATBYTES> flag; the SV or the +string appended will be upgraded to UTF-8 if necessary. + If C<flags> has the C<SV_SMAGIC> bit set, will C<mg_set> on C<dsv> afterwards if appropriate. C<sv_catpvn> and C<sv_catpvn_nomg> are implemented |