_uvchr>,
but are used for UTF-8 encoded strings. The two forms are different names for
the same thing. Each call to one of these classifies the first character of
the string starting at C. The second parameter, C, points to anywhere in
the string beyond the first character, up to one byte past the end of the
entire string. Although both variants are identical, the suffix C<_safe> in
one name emphasizes 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 FALSE, at the
discretion of the implementation, and subject to change in future releases.
Variant C_LC> is like the C_A> and C_L1> variants,
but the result is based on the current locale, which is what C in the name
stands for. If Perl can determine that the current locale is a UTF-8 locale,
it uses the published Unicode rules; otherwise, it uses the C library function
that gives the named classification. For example, C when not in
a UTF-8 locale returns the result of calling C. FALSE is always
returned if the input won't fit into an octet. On some platforms where the C
library function is known to be defective, Perl changes its result to follow
the POSIX standard's rules.
Variant C_LC_uvchr> acts exactly like C_LC> for inputs less
than 256, but for larger ones it returns the Unicode classification of the code
point.
Variants C_LC_utf8> and C_LC_utf8_safe> are like
C_LC_uvchr>, but are used for UTF-8 encoded strings. The two forms
are different names for the same thing. Each call to one of these classifies
the first character of the string starting at C. The second parameter,
C, points to anywhere in the string beyond the first character, up to one
byte past the end of the entire string. Although both variants are identical,
the suffix C<_safe> in one name emphasizes 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 FALSE, at the discretion of the implementation, and subject to change in
future releases.
=over 8
=item isALPHA
X
Returns a boolean indicating whether the specified input is one of C<[A-Za-z]>,
analogous to C.
See the L for an explanation of
variants
C, C, C, C,
C, C, C, C,
and C.
bool isALPHA(int ch)
=for hackers
Found in file handy.h
=item isALPHANUMERIC
X
Returns a boolean indicating whether the specified character is one of
C<[A-Za-z0-9]>, analogous to C.
See the L for an explanation of
variants
C, C, C,
C, C, C,
C, C, and
C.
A (discouraged from use) synonym is C (where the C suffix means
this corresponds to the C language alphanumeric definition). Also
there are the variants
C, C
C, and C.
bool isALPHANUMERIC(int ch)
=for hackers
Found in file handy.h
=item isASCII
X
Returns a boolean indicating whether the specified character is one of the 128
characters in the ASCII character set, analogous to C.
On non-ASCII platforms, it returns TRUE iff this
character corresponds to an ASCII character. Variants C and
C are identical to C.
See the L for an explanation of
variants
C, C, C, C,
C, C, and C.
Note, however, that some platforms do not have the C library routine
C. In these cases, the variants whose names contain C are the
same as the corresponding ones without.
bool isASCII(int ch)
=for hackers
Found in file handy.h
=item isBLANK
X
Returns a boolean indicating whether the specified character is a
character considered to be a blank, analogous to C.
See the L for an explanation of
variants
C, C, C