diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-04-24 15:29:16 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-05-20 08:59:15 -0600 |
commit | c753c8d3b46bc998479df764b00e374662756076 (patch) | |
tree | 441ac09a07291e122beb115494d16b279c40315d /handy.h | |
parent | 20cfcb3ce7a5f8c48c7886e24c963b74493ecc10 (diff) | |
download | perl-c753c8d3b46bc998479df764b00e374662756076.tar.gz |
handy.h: define some synonyms for consistency
Other macros have these suffixes, so for uniformity add these.
Diffstat (limited to 'handy.h')
-rw-r--r-- | handy.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -702,11 +702,13 @@ Behaviour is only well defined when isXDIGIT(*str) is true. =for apidoc Am|char|toUPPER|char ch Converts the specified character to uppercase, if possible; otherwise returns -the input character itself. +the input character itself. Only ASCII characters are changed. Variant +C<toUPPER_A> is equivalent. =for apidoc Am|char|toLOWER|char ch Converts the specified character to lowercase, if possible; otherwise returns -the input character itself. +the input character itself. Only ASCII characters are changed. Variant +C<toLOWER_A> is equivalent. =cut @@ -1046,6 +1048,8 @@ EXTCONST U32 PL_charclass[]; # define toUPPER(c) (isLOWER(c) ? (c) - ('a' - 'A') : (c)) #endif +#define toLOWER_A(c) toLOWER(c) +#define toUPPER_A(c) toUPPER(c) /* Use table lookup for speed; return error character for input * out-of-range */ @@ -1053,6 +1057,8 @@ EXTCONST U32 PL_charclass[]; ? UNI_TO_NATIVE(PL_latin1_lc[ \ NATIVE_TO_UNI( (U8) (c)) ]) \ : UNICODE_REPLACEMENT) +#define toLOWER_L1(c) toLOWER_LATIN1(c) /* Synonym for consistency */ + /* Modified uc. Is correct uc except for three non-ascii chars which are * all mapped to one of them, and these need special handling; error * character for input out-of-range */ |