Movatterモバイル変換


[0]ホーム

URL:


functions /lc
(source,CPAN)
You are viewing the version of this documentation from Perl 5.16.1.View the latest version
#lc EXPR
#lc

Returns a lowercased version of EXPR. This is the internal function implementing the\L escape in double-quoted strings.

If EXPR is omitted, uses$_.

What gets returned depends on several factors:

#Ifuse bytes is in effect:
#On EBCDIC platforms

The results are what the C language system calltolower() returns.

#On ASCII platforms

The results follow ASCII semantics. Only charactersA-Z change, toa-z respectively.

#Otherwise, ifuse locale (but notuse locale ':not_characters') is in effect:

Respects current LC_CTYPE locale for code points < 256; and uses Unicode semantics for the remaining code points (this last can only happen if the UTF8 flag is also set). Seeperllocale.

A deficiency in this is that case changes that cross the 255/256 boundary are not well-defined. For example, the lower case of LATIN CAPITAL LETTER SHARP S (U+1E9E) in Unicode semantics is U+00DF (on ASCII platforms). But underuse locale, the lower case of U+1E9E is itself, because 0xDF may not be LATIN SMALL LETTER SHARP S in the current locale, and Perl has no way of knowing if that character even exists in the locale, much less what code point it is. Perl returns the input character unchanged, for all instances (and there aren't many) where the 255/256 boundary would otherwise be crossed.

#Otherwise, If EXPR has the UTF8 flag set:

Unicode semantics are used for the case change.

#Otherwise, ifuse feature 'unicode_strings' oruse locale ':not_characters') is in effect:

Unicode semantics are used for the case change.

#Otherwise:
#On EBCDIC platforms

The results are what the C language system calltolower() returns.

#On ASCII platforms

ASCII semantics are used for the case change. The lowercase of any character outside the ASCII range is the character itself.

Perldoc Browser is maintained by Dan Book (DBOOK). Please contact him via theGitHub issue tracker oremail regarding any issues with the site itself, search, or rendering of documentation.

The Perl documentation is maintained by the Perl 5 Porters in the development of Perl. Please contact them via thePerl issue tracker, themailing list, orIRC to report any issues with the contents or format of the documentation.


[8]ページ先頭

©2009-2025 Movatter.jp