Converts the first UTF-8 encoded character in the sequence starting at C and
extending no further than S> to its foldcase version, and
stores that in UTF-8 in C, and its length in bytes in C. Note
that the buffer pointed to by C needs to be at least C
bytes since the foldcase version may be longer than the original character.
The first code point of the foldcased version is returned
(but note, as explained at L, that there may be more).
The suffix C<_safe> in the function's name indicates that it will not attempt
to read beyond S>, provided that the constraint S e>> is
true (this is asserted for in C<-DDEBUGGING> builds). If the UTF-8 for the
input character is malformed in some way, the program may croak, or the
function may return the REPLACEMENT CHARACTER, at the discretion of the
implementation, and subject to change in future releases.
UV toFOLD_utf8_safe(U8* p, U8* e, U8* s,
STRLEN* lenp)
=for hackers
Found in file handy.h
=item toFOLD_uvchr
X
Converts the code point C to its foldcase version, and
stores that in UTF-8 in C, and its length in bytes in C. The code
point is interpreted as native if less than 256; otherwise as Unicode. Note
that the buffer pointed to by C needs to be at least C
bytes since the foldcase version may be longer than the original character.
The first code point of the foldcased version is returned
(but note, as explained at L, that there may be more).
UV toFOLD_uvchr(UV cp, U8* s, STRLEN* lenp)
=for hackers
Found in file handy.h
=item toLOWER
X
Converts the specified character to lowercase. If the input is anything but an
ASCII uppercase character, that input character itself is returned. Variant
C is equivalent.
U8 toLOWER(U8 ch)
=for hackers
Found in file handy.h
=item toLOWER_L1
X
Converts the specified Latin1 character to lowercase. The results are
undefined if the input doesn't fit in a byte.
U8 toLOWER_L1(U8 ch)
=for hackers
Found in file handy.h
=item toLOWER_LC
X
Converts the specified character to lowercase using the current locale's rules,
if possible; otherwise returns the input character itself.
U8 toLOWER_LC(U8 ch)
=for hackers
Found in file handy.h
=item toLOWER_utf8
X
This is like C>, but doesn't have the C
parameter The function therefore can't check if it is reading
beyond the end of the string. Starting in Perl v5.30, it will take the C
parameter, becoming a synonym for C. At that time every
program that uses it will have to be changed to successfully compile. In the
meantime, the first runtime call to C from each call point in the
program will raise a deprecation warning, enabled by default. You can convert
your program now to use C, and avoid the warnings, and get an
extra measure of protection, or you can wait until v5.30, when you'll be forced
to add the C parameter.
UV toLOWER_utf8(U8* p, U8* s, STRLEN* lenp)
=for hackers
Found in file handy.h
=item toLOWER_utf8_safe
X
Converts the first UTF-8 encoded character in the sequence starting at C and
extending no further than S> to its lowercase version, and
stores that in UTF-8 in C, and its length in bytes in C. Note
that the buffer pointed to by C needs to be at least C
bytes since the lowercase version may be longer than the original character.
The first code point of the lowercased version is returned
(but note, as explained at L, that there may be more).
The suffix C<_safe> in the function's name indicates that it will not attempt
to read beyond S>, provided that the constraint S e>> is
true (this is asserted for in C<-DDEBUGGING> builds). If the UTF-8 for the
input character is malformed in some way, the program may croak, or the
function may return the REPLACEMENT CHARACTER, at the discretion of the
implementation, and subject to change in future releases.
UV toLOWER_utf8_safe(U8* p, U8* e, U8* s,
STRLEN* lenp)
=for hackers
Found in file handy.h
=item toLOWER_uvchr
X
Converts the code point C to its lowercase version, and
stores that in UTF-8 in C, and its length in bytes in C. The code
point is interpreted as native if less than 256; otherwise as Unicode. Note
that the buffer pointed to by C needs to be at least C
bytes since the lowercase version may be longer than the original character.
The first code point of the lowercased version is returned
(but note, as explained at L, that there may be more).
UV toLOWER_uvchr(UV cp, U8* s, STRLEN* lenp)
=for hackers
Found in file handy.h
=item toTITLE
X
Converts the specified character to titlecase. If the input is anything but an
ASCII lowercase character, that input character itself is returned. Variant
C is equivalent. (There is no C for the full Latin1
range, as the full generality of L is needed there. Titlecase is
not a concept used in locale handling, so there is no functionality for that.)
U8 toTITLE(U8 ch)
=for hackers
Found in file handy.h
=item toTITLE_utf8
X
This is like C>, but doesn't have the C
parameter The function therefore can't check if it is reading
beyond the end of the string. Starting in Perl v5.30, it will take the C
parameter, becoming a synonym for C. At that time every
program that uses it will have to be changed to successfully compile. In the
meantime, the first runtime call to C from each call point in the
program will raise a deprecation warning, enabled by default. You can convert
your program now to use C, and avoid the warnings, and get an
extra measure of protection, or you can wait until v5.30, when you'll be forced
to add the C parameter.
UV toTITLE_utf8(U8* p, U8* s, STRLEN* lenp)
=for hackers
Found in file handy.h
=item toTITLE_utf8_safe
X
Converts the first UTF-8 encoded character in the sequence starting at C and
extending no further than S> to its titlecase version, and
stores that in UTF-8 in C, and its length in bytes in C. Note
that the buffer pointed to by C needs to be at least C
bytes since the titlecase version may be longer than the original character.
The first code point of the titlecased version is returned
(but note, as explained at L, that there may be more).
The suffix C<_safe> in the function's name indicates that it will not attempt
to read beyond S>, provided that the constraint S e>> is
true (this is asserted for in C<-DDEBUGGING> builds). If the UTF-8 for the
input character is malformed in some way, the program may croak, or the
function may return the REPLACEMENT CHARACTER, at the discretion of the
implementation, and subject to change in future releases.
UV toTITLE_utf8_safe(U8* p, U8* e, U8* s,
STRLEN* lenp)
=for hackers
Found in file handy.h
=item toTITLE_uvchr
X
Converts the code point C to its titlecase version, and
stores that in UTF-8 in C, and its length in bytes in C. The code
point is interpreted as native if less than 256; otherwise as Unicode. Note
that the buffer pointed to by C needs to be at least C
bytes since the titlecase version may be longer than the original character.
The first code point of the titlecased version is returned
(but note, as explained at L, that there may be more).
UV toTITLE_uvchr(UV cp, U8* s, STRLEN* lenp)
=for hackers
Found in file handy.h
=item toUPPER
X
Converts the specified character to uppercase. If the input is anything but an
ASCII lowercase character, that input character itself is returned. Variant
C is equivalent.
U8 toUPPER(U8 ch)
=for hackers
Found in file handy.h
=item toUPPER_utf8
X
This is like C>, but doesn't have the C
parameter The function therefore can't check if it is reading
beyond the end of the string. Starting in Perl v5.30, it will take the C
parameter, becoming a synonym for C. At that time every
program that uses it will have to be changed to successfully compile. In the
meantime, the first runtime call to C from each call point in the
program will raise a deprecation warning, enabled by default. You can convert
your program now to use C, and avoid the warnings, and get an
extra measure of protection, or you can wait until v5.30, when you'll be forced
to add the C parameter.
UV toUPPER_utf8(U8* p, U8* s, STRLEN* lenp)
=for hackers
Found in file handy.h
=item toUPPER_utf8_safe
X
Converts the first UTF-8 encoded character in the sequence starting at C and
extending no further than S> to its uppercase version, and
stores that in UTF-8 in C, and its length in bytes in C. Note
that the buffer pointed to by C needs to be at least C
bytes since the uppercase version may be longer than the original character.
The first code point of the uppercased version is returned
(but note, as explained at L, that there may be more).
The suffix C<_safe> in the function's name indicates that it will not attempt
to read beyond S>, provided that the constraint S e>> is
true (this is asserted for in C<-DDEBUGGING> builds). If the UTF-8 for the
input character is malformed in some way, the program may croak, or the
function may return the REPLACEMENT CHARACTER, at the discretion of the
implementation, and subject to change in future releases.
UV toUPPER_utf8_safe(U8* p, U8* e, U8* s,
STRLEN* lenp)
=for hackers
Found in file handy.h
=item toUPPER_uvchr
X
Converts the code point C to its uppercase version, and
stores that in UTF-8 in C, and its length in bytes in C. The code
point is interpreted as native if less than 256; otherwise as Unicode. Note
that the buffer pointed to by C needs to be at least C
bytes since the uppercase version may be longer than the original character.
The first code point of the uppercased version is returned
(but note, as explained at L, that there may be more.)
UV toUPPER_uvchr(UV cp, U8* s, STRLEN* lenp)
=for hackers
Found in file handy.h
=back
=head1 Character classification
This section is about functions (really macros) that classify characters
into types, such as punctuation versus alphabetic, etc. Most of these are
analogous to regular expression character classes. (See
L.) There are several variants for
each class. (Not all macros have all variants; each item below lists the
ones valid for it.) None are affected by C