FPublisher
Web-����������: ���� ������
������������ PHP
strtolower
strtolower � ����������� ������ � ������ �������
��������
string strtolower ( string $str )
���������� ������ string , � ������� ��� ��������� ������� ���������� � ������ �������.
�������������� ���� ��� ����� ������� � ��������� ������������ � ������ ������� ������. ��� ��������, ���, ��������, � ������������ �� ��������� ������ «C» locale, ������ �� ����� ������������.
������ #1 ������ ������������� strtolower()
= «Mary Had A Little Lamb and She LOVED It So» ;
$str = strtolower ( $str );
echo $str ; // �������: mary had a little lamb and she loved it so
?>
���������: ��� ������� ��������� ��� ��������� ������ � �������� �����.
������ � ������ ������� (PHP)
������������� ������ � ������ �������, � PHP, ����� ��� ������ ������� string strtolower (string str) . ����� ���������� ������� ��������� ������ ��� ��� ������� ����� � ������ ��������.
������
���� ������, ������� ����� ������������� � ������ �������.
strtolower � ������� �����
� ���������� ������ ����� ��������� ��������. ��� ��������� ����� ������������ ������� string mb_strtolower(string str [, string encoding]) , �������� ��������� strtolower() , ������ ������ ���������� ���������� ���������.
�������������� ������ � ������ �������
���������� �������, ������� ����������� ������ � ������ �������.
4 ������ 4
����� ����� ������� ���, ����� ������ �� ���� �������� ������, � � ��� ��������� tolower(). ��� ������ tolower() ������������ �������� �������:
���� ������� tolower, ������� ��������� ������� � ������ �������. ����� ��������� �� �� ���� �������� ������:
���� �� toLower �������� � �������� �������.
������ ������ — ������� ������ � ��������������� ������� �� ����:
������ ������ — ������������� ������� ����� ���������� � �������� ���������:
������ ������ �������� �������, ���� ������� �������������� ���������.
������� ����� ��� ������ ������� tolower() �� ctype.h
�� ��� ����� �����? ���������� ������ ������� � ������� c c++ ��� ������� ���� ������.
���������
�������
����������� �� �����
��� �������� �� ����� ���������� � �������� ��� ������ � ���� ��������� ��� ������ RSS.
������ ����� / ������� � 2020 Stack Exchange Inc; ���������������� ���������� �������� ��� �������� �������� cc by-sa 4.0 � ��������� ������ �� ��������. rev 2020.11.11.35402
��� ������������� ������ � ������ ������� � Bash?
���� �� ������ � ��� ����� ������������� ������ � ������ ������� ��������?
��������, ���� � ���� ����:
� ���� ������������� ��� �:
19 �������
POSIX standard
�� awk
Non-POSIX
�� ������ ����������� � ���������� ������������� ��������� �������:
Bash 4.0
� ������ �������
� ������� �������
Toggle (�������������������, �� ������������� ������������� �� ����� ����������)
Capitalize (�������������������, �� ������������� ������������� �� ����� ����������)
�� awk:
� ����, ��� ��� ����������� ����, �� � ������ ���� ����� ��� ������� �����, ������� � �������, ��� ��������� ��� �����:
������� -> ������: ������������ python:
��� Perl (��������, ��� �������):
��� NodeJS, ���� � ��� ���� (� ������� ������. ):
�� ����� ������ ������������ dd (�� � �� �� ����!):
����� -> �������:
��� Perl (��������, ��� �������):
��� NodeJS, ���� � ��� ���� (� ������� ��������. ):
�� ����� ������ ������������ dd (�� � �� �� ����!):
�����, ����� �� �������� «��������», � �����������, ��� �� ������ � ���� bash �� ���� �� ������ ������������ zsh ��� ��� �� ������, ���
��� ������� �������� �
� ������� ��������.
������ ������ zsh!
������������� GNU sed :
��� ����������� ��������� (��� bashisms), ��������� ������ ���������:
� ��� �������� ��������:
Bash �������� ������� ������ � ��������� ����������
���������� ���������
� ����� �� ����� �� ���� ��������������� �� �������, ������� � ���� ����������, �� ������ � ���, ��� � ������� �� ��� ������������ ������������� �� http://commandlinefu.com. ��� ����� �� ������������, ��� ���� �� cd � ����� ������� � ����� ����������� �������� �����, ������� ����� �������� ��� ����� � ����� � ������ �������� ����������, ����������, ����������� � �������������. ��� ��������� ����������� ��������� ������ � �������� ������� ��� ��� �������������� ��������, ������� �� ��������� �� ����� ������.
�� ������ ������� ������� ������ �����(.) ����� ������, ������� ���������� ������� ������� ��� ������ ����.
� �������, ��� ��� ������� �������� �������� ���� ����, ��� ������� �� �������� ������� �������� ������������� — �� �������� � ������ ���.
� bash 4 �� ������ ������������ typeset
�� ������ ����������� ���
���� ������������ v4, ��� ����������-�. ���� ���, ��� �������, ������ ����������� �������. ������ ������ (� �����������) �� ���� ���� ���� ������ ������� ��� �������� ���� ����.
- ������: a=»Hi All» � �����: lcase a ����� ������ �� �� �����, ���: a=$( echolcase «Hi All» )
- � ������� lcase, ��������� $ ������ $ ��������� ����� ��������, ���� ���� ������ ����� ������� �������.
��� ������ Bash ����� 4.0 ��� ������ ������ ���� ����� ������� (��� ��� ��� �� ����� / exec ����� �������):
technosaurus ��� ����� ���� ���������, ���� �� ������� ������� ������� ��� mee.
�������� �� ��, ��������� ������ ���� ������ � ����� �� ���� ����� �� technosaurus. ��� ���� ������ ����� �������, ������� ���� ����������� �� ����������� �������� (������� � ���������), � ����� ����� ������ ������ bash. � ����� ��� ����������� ���������, ��������� � �������������� ����������, ��� � ��������� ������ ��� ���������� ����������� ����������. ��� �������� ����� ������ ��� ����, ���� � �����, ��� ��������. ��� �������� ����� ������������:
- GNU bash, ������� � ������ 4.1.2(1)-����� (����������� x86_64-RedHat ���-������-���)
- GNU bash, ������ 3.2.57 (1)-release (sparc-sun-solaris2.10)
������� C-����� ��� ����� ��� �������� �����. �� ������ ����, ���� �� �� ������ ������ ��������� ������ ��� ��� � ����� ��������. � ���� ������ ������ ���������, ���������� �� char $
������ ������ � �������������� ������� ��������, ������� �� ����� ���� �� ���������� Bash .
���� �� ������, ��� � ��� ����� bash4, �� ������ ������ ������������ $ ������� (��� ����� � �����). ��� Bash �� 4 (��� Mac ��� ��� ���������� Bash 3.2, ��������). � ����������� ������������ ������ ������ @ghostdog74, ����� ������� ����� ����������� ������.
���� �� ������ ��������� lowercase ‘my STRING’ � �������� �������� ������. � ����� ����������� � ��������� ���������� �� var, �� ��� �� ����� ����������� � Bash , ��� ��� �� �� ����� ���������� ������. ������ ��� ������ �������. ����� ��������� � ���-�� ����� var=»$(lowercase $str)» .
��� ��� ��������
��� ��� ��������, ������� ������������� ������������� ASCII ������� ������� � printf � �� adding 32 ���� upper-to->lower ��� subtracting 32 ���� lower-to->upper . ����� ����������� printf ����� ��������������� ����� ������� � char. �� ‘A’ -to-> ‘a’ � ��� ���� ������� � 32 ���������.
��������� printf ���������:
� ��� ������� ������ � ���������.
�������� �������� �� ����������� � ����, ��� ��� ��� ��������� ������:
� ���������� ����� ���������� �����:
��� ������ �������� ������ ��� �������� ASCII, ����.
��� ���� ��� ���������, ��� ��� � ����, ��� � ������� ��� ������ ASCII-�������.
� � ��������� ��� ��� ��������� ���������� CLI ��� ����� ��������, ��������.
�������������� ���� �������� ������ ��� ���������. ��� ��� ��� ������ ��������� ���������.
� ������������ �� �������������� ��������� ����� a-z �� �������� �������� � ������ �������. ����� ������ ������� ������ ���� ���������� � stdout, ��� ���.
����������� ���� ����� � path / to / file / filename � ��������� a-z � A-Z
��� �������������� ������� �������� � ������� �������
��� �������������� �� �������� �������� � ������ �������
������������� � ����:
��� �������� ��������������� ������ � ����������. ���������� �������� �� ���� — $SOURCE_NAME to $TARGET_NAME
��� ������� ����� ������� ������� JaredTS486 ��� ������� ���������� ����������� ����������� Bash (������� ������ Bash
� ��������� 1000 �������� ����� ������� ��� ��������� ������ (25 ��������) � ������� ������ (445 ��������), ��� ��� �������������� � ������, ��� � � ������� �������. ��������� �������� ������ ����� ��������������� ������ �������, �������������� � ������ ������� ������ ����������� �������, ��� � �������.
� ������� ��� ������ � ����������� ������� �������� �� ���� ��������, ������������ � Bash 3.2. ��� ������ ������� ����� ����������, ��� ����������� ��������, ��������� �����, � ���� �������, ��� tr � ���������� �������.
��� ���������� ����� ��� 1000 �������� �� 25 ��������:
- 0.46 s ��� ����� ������� � ��������� ��������; 0.96 s ��� �������� ��������
- 1.16 s ��� Orwellophile ��� � ������ �������; 1.59 S ��� ���������
- 3,67 � ��� tr � ������ �������; 3,81 � ��� �������� ��������
- 11.12 s ��� ghostdog74 ��� � ������ ��������; 31.41 s ��� �������� ��������
- 26.25 s ��� technosaurus’ � ������ ��������; 26.21 s ��� �������� ��������
- 25.06 s ��� JaredTS486 ��� � ������ ��������; 27.04 s ��� �������� ��������
���������� ������������� ��� 1,000 �������� 445 �������� (��������� �� ������������� «The Robin» by Witter Bynner):
- 2s ��� ����� ������� � ��������� ��������; 12s ��� �������� ��������
- 4s ��� tr � ������ �������; 4s ��� �������� ��������
- 20s ��� Orwellophile ��� � ������ ��������; 29s ��� �������� ��������
- 75-� ��� ghostdog74 ��� ������ � �������� ������; 669s ��� �������� ��������. ��������� ��������, ��������� ���������� ������� � ������������������ ����� ������ � �������������� ������������ � ������ � ������������� �������
- 467s ��� technosaurus’ � ������ ��������; 449s ��� �������� ��������
- 660-� ���� ��� JaredTS486 ��� � ������ ��������; 660s ��� �������� ��������. ��������� ��������, ��� ���� ������ ����������� ����������� ������ �������� (����� �������) � Bash
������ �����: � �� ����� ��� ������� ������ ����� ����� ���������� ��������� �����, ������� ���������, � �������� ��� ���������� ���� ����� �� �������� ���������. ���������� �� ��� ���, ���� �� ����� �������� ��� ��������� �����.
��������� �������������� ����� �������:
- ���������� ������ ������� Shell builtin, ��� ��������� �������� ��������� �������� �� ����� ������� �������� ������ � ����� ��������
- �������� ���-��������, ������� ����� ������ �� ������������������
- ���������� ��������� ��������, ������� �������������� � �������������� ��� ������������������, ����� ��� ���������� ������ ����� � ����������, ������� ��������� ���������� � ����� � ������������� ���������� ���������. ��� ��������� ������� �������, ��� �������� ������� ����� ������
- ����� ������ ���������� ���, ��������� ����������� ���������� ����������� �������� ��� ��������������. ��������, �������������� ������ � ����� ������� ��������� �������� �������� � ������ ������� ������� ������ 3 �������� �����. ��� �������������� ������������ �������� ASCII ������������ ����� �������� ����� ��� 26
- UCS � LCS ����� ��������� ��������������� ���������
ToLower
����������� ������� �������� ������ � ������ �������. ������ �������, ������ �������� ������ ���������, ��������� ������������ ������������� ������� (������� �������) � ������ �������.
����������. ������ ������� ����� ������������ � ������ ���� ��������� �������� � ��������������� ������������� �������� ����������� PHP �������� strtolower. ������ ��� ���������� �� ��������� ���������.
��������� �������
�������� | �������� | � ������ |
---|---|---|
text | �������� ������. | |
lang | ������������� �����. | 10.0.11 |
��. �����
������� �������������
���������������� �����������
�� ����� ����, ���� ������������ ������� ���� ����������� �� ������������� ������������� ������� �������.
��� ����� ����� ����� ���� �������������� �� �����
�� �������, ��� ���������������� �����������, �������� �� ���������, �� �������� ����������� �������������. ��������������� �� �� ������������� ����� ��� ������������.
����� ���������������� ����������� �� �������� ������ ��� ���������� �����������. �� �������� �������� ����������� �� ������.
��� ������������� std:: string � ������ �������?
� ����, ����� ������������� std::string � ������ �������. � ���� � ������� tolower() , ������ � ������� � ���� ���� �������� � ���� �������� � ���� �� �������� ��� ��� ������������ � std::string ����������� �������� �� ������� �������.
���� �� ������������, ������� �������� 100% �������?
21 �����:
��� ������������� �� ������ � ��� ���������� ������� �������. ��� �������� ������� ������, �������� �� ������ �������� ��� ��������� � ��������� ������.
���� �� ������������� �������� tolower() , ��� ������������� ������������, ������� � �� ���������� ��� ������������:
������ � ����, ��� ::tolower() ����� ��������� ������ ������������ ����������� ��������, ��� ����� �������� ��� ������ ���������, �������� ��� ������������� ������������� ���������, ����� ��� UTF-8.
��� ����� ���� �������� Boost string:
���, ��� non-in-place:
tl; dr
������������ ���������� ICU.
������� ���� �������� �� ������: ��� ����� ����������� ������ std::string ? ��� ISO-8859-1? ��� ��������, ��������� ISO-8859-8? ��� ������� �������� Windows 1252? ����� �� ��� ��, ��� �� ����������� ��� �������������� �������� � ������ �������? (��� �� ������ ������� � ������� ��� �������� ��� 0x7f ?)
���� �� ����������� UTF-8 (������������ ��������� ����� ����� 8-������ ���������) � std::string ��� ���������, �� ��� ����������� ����, �������, ��� �� ��� ��� ������������� ����, ������ ��� �� ������� ������������� ������������������ �������� � ����������, ������� �� ����� � ������������� ���������. ���� ���-�� ����� �������, ��� .substr() — �������� ����� ������������ ��������. (������ ��� ���������� ������������� ������������������ �������� � ������������ (���-) ������.)
� ��� ������ �� ���������� ���-�� ����� std::toupper( ‘?’ ) , in ����� ���������, �� ���������� � �������� ����. (������ ��� ��� ������ ���������� ������� ��� «���������» �� ����������� �����������, ������� ����� ��������� ������ ���� ������ ����������, � �� «SS» ����� �����.) [1] ������ ������ std::tolower( ‘I’ ) , ��� ������ ���� ������ ���������� � ����������� �� ������. � ��������, ‘i’ ���� �� ���������; � ������, ‘?’ (��������� �������� ����� DOTLESS I) — ��� ��������� ���������.
����� ���� ���� � ���, ��� ����������� ���������� ������� �� ����, ����� ������ ������������ �� ������ �������� ���� ����������� �����������. � ��� ������, ���� ��� �� ���?
��� ��� ������������� ���� ��������� �����, ������� �������� ���������� �� ���� ���� ���������,� ��� �� std::string .
(� C++11 ����������: std::u16string � std::u32string are �����, �� ��� ����� �� ���������.)
� �� ����� ��� Boost �������� �������, API ������, ���������.Locale-��� � �������� ������� ������ ICU. ���� Boost — ��� compiled � ���������� ICU. ���� ��� �� ���, ���������.������ ���������� ���������� ������, ���������������� ��� ����������� ����������.
� ������ ���, ������ Boost ��� ���������� � ICU ������ ����� ���� ��������� �����. (��� Windows ��� �������������� ���������������� �������� ������, ������� � ��� ���� ����� ��������� �� ������ � ����� ����������, � ��� ��������� ���������� ����� ����� ������. )
������� ����� � �� ������������ �������� ������ ��������� Unicode ����� �� ��� ������ � ������������ ICU ���������� ��������:
���������� (� G++ � ���� �������):
[1] � 2020 ���� ����� �� �������� ���������� ����������, ��� «» U+1E9E LATIN ��������� ����� SHARP S ����� �������������� ����������, ��� ������� ������ ������������� �������������� «SS», ����� �������� ���������������, ��������, � ��������� (��� ����� ���������� �������). ��� ���������� ������, ������� ���������� �� ������� ��������.
���� ������ �������� UTF-8 �������� �� ��������� ��������� ASCII, �� boost::algorithm:: to_lower �� ����������� ��. ����� ������������ boost::locale:: to_lower, ����� ��������� UTF-8. ��.http://www.boost.org/doc/libs/1_51_0/libs/locale/doc/html/conversions.html
��������� range-based ��� ����� C++11 ����� ������� ��� �����:
��� ����������� ������ ������� ���: ���� �� ������ ��������� ��������� �������������� � ������ ������, ��� ����� �������������� �������� ��� ����� ��� �������� ����� ������� std::transform . ��������� STL ������ ��������������� ������� � ������� ��������� (���������� ��� �� ������ �������� �����), ������ ���������� �� ����� ������������� ����������, � �� �������� ��������� ������.
��������� � ����, ���������� Boost ������������� ����� � ����� ������ ������������������. � �������� �� unordered_map � STL, � ��� ���� � ������� � 3 ���� ��������� (������ ������ 2, ������ ��� � 10 ���). ����� ���� �������� �������� ������� �����.
������� ��������� ������, ��� � ������, ��� �� ������ �������, ����� tolower ����� ������� ��� ������ ��� ��������� «��� ����� ����» ����� ������� ��� ��������.
� ������ ��� ����� �� Amazon EC2, ������� ������������������ �������� �� ����� �����, �� �� ��� ����� �������� ����.
-O2 ������ ���:
� �����, ��� � ������ �������� ����� �� ���������� ������, �� � ���� ������������ ���� EC2, ������� ��� ������������� �� ����� ����������� ��� �� ����� ������.
std::ctype::tolower() �� ����������� ���������� C++ ����������� ����� ��������� ������� ��� ��� ���. ��� ������, ����������� �� tolower reference page
����� ������� ������ ������������� ������ � ������ �������, �� ���������� � ������������ ���� std, ����������� � ���������
1: ������ � / ��� ��������
2: ������ ��� ��������
������ ������ � �������������� ��������� �� ������ ����� � ������� ����������
������������� Boost �������� POCO (pocoproject.org).
POCO ������������� ��� ��������:
- ������ ������� ������ ����� ��� ��������� �������� ������.
- ������ ������� �������� �������� ������ �� �����.
«�� �����» ������ ������ ����� «�� �����» � ��������.
��� ������ �������� ����:
���� ������ ������������� ������� ������� � ������ �� �����, ���� �����, � ��� �������� ����� ������. ������� isupper () / ������������� ������� clocale.h ������� ������������ � ���������, ��������� � ����� ���������������, �� ���� ���, �� ������ ������ ��������� UtoL[] � ���� ������������.
��������, ��� ������� C �� ����� ���� �������� ����� ���� 8-������� ints (��������� ������� ������ �������� �� ������ ������), �� ������ ������� 256-�������� ������, ���������� �������������� ����� ��������, � � ������� �������������� ����������� ������� � ����� ������ � �������� �������� � ������ ��������������.
������ ������������� 1-���-1, ������, ����� ������ ������� �������� �������� �������� Byte int ��� �������� ������� ��������. �� ������ ����� islower() � isupper() �������� �����.
��� �������� ���.
���� ������, � �� �� �����, ��������� ������������� ����� ������ �������, ������� �� ������ ���������.
���� ������ ����� ���� �������� ������������ ��� ������ �� ����������� �����������, ��� ������������� ������ ������������ ���������, ��������� ��� ������ if, ���������� ���������. ��� ��������� ������ ������������ ������ �� ��� ������ ������ � ����� ��������� ������������� ��������� ���������.
��������� ����� ����� ���������� ���� ������ ��� ��� �� �����, ������� ������������ ��� �������������� EBCDIC � ASCII.
��� ����� �������, ���� �� ������ ���-�� �������:
������ �������� ��������, ��� ����������� @AndreasSpindler �� ����� ��� �� �����, ��� ������ �����������, ���� �� ��������� ��� ���-��, ��� �� ������ ������� ASCII.
�������������� ������ � ������ ������� (��� ���������� ������� ��� ������� ��������!)
����� ����� ���� �������� �������� ����, ������� ��������� ������������ ������� ������ ASCII (�������� ������ �������� ASCII �������� ), � ���� ��������� ������� ������� ���� ������ � ������ ��������.
�����: ��� �� ��������� ������������ ���������� �������, ������� ����������� ������ (��� ������ ���� ������) � ������ ������� (��������, ToLower () � .NET, strtolower () � PHP , . )! ������ �� ������ ������������ ��� ��������� ���������� �������.
��� ���� ������ ���������: ������ ����� �� �������� ������ ��������� ��������. ������� ������ ������������ ����� ����� �������� �������� ��������, �������� ������� ��������, ���� � ������ �������� �������� ASCII .
�����������
����� �������: 42
Shell — 10
������� Perl-������� @ Gowtham � �������������� / bin / tr .
�����������
Perl — 11 10 ��������.
y /// ��������� � tr /// !
% perl -pe ‘y / AZ / az /’ & lt; & lt; & lt; �������������, @ WORLD!� ������, @ world!
�����������
Python 3, 58
�����������
Ruby, 18 ��������
������ ����� �����������.
������ ��� ������������: ��������� � ����� ������:
C 64 63 59 55 ��������
�����������
J — 30
J �������� ������ ������, �������, ����� ������� ��� �� �����:
- ����������� � ������������ ����: 1 !: 1] 1
- ��������� �������� � ������������ ������� �����: & amp;. (A. & Amp; i.) ���������� �������� �������� ��� ������ �����; ������� ����� �������� ������� «@» � «Z» ��������� ����������: 1 = I. .
- ��� ������ ��������� ������� ����� �������� 32: ] + 32 * .
- �������� ��������, ��� ��� (2) ������� ������� ��� (5): �� ������ � ������������� �� ���������� ������� � �������������, ������� ������, ����� �� ���������, �� ���������� ��� ����� ����� ������������ �� �������.
��������, ��� ��� ���������� ���������� ������������� ������ ASCII; �� ���� ������ ����� �������������� ��� ������� �� ������� ������������ ��������� � �������.
�����������
Golfscript — 17
- <>% ���������� ��� ������ ��� ������� ������� � ������.
- .. �������� ������� ����� ����� (������) ������.
- 64 & gt; 1, ���� ��� ������� ������ 64, ����� 0.
- \ ������ ��� �������� � ����� (�������� ������ ����� ������ � ��������� ��������� 64 & gt; �� ������ �������.
- 91 & lt; ���������, ������ �� ��� ������� 91. ���������� ���� 3.
- * �������� ���������� ����� 3 � 5 ������. ������ ����� 1, ���� ��� ���� ���� ���������.
- 32 * �������� ��������� ���� 6 �� 32. ����� 32, ���� ��� 6 ��� 1, ����� 0.
- + �������� ��������� (32 ��� 0) � ��� �������.
Perl: 24 �������
�����������
JavaScript — 109 104 (ES6: 95)
������� ��������� �� ������������ ������.
��������� ��������, ���� ������� ������������ ��������� ������� ES6:
�����������
javascript 80
(76, ���� �� ������� «X» )
� ���������� � alert — 92
��������� @FireFly @some @ C5H8NNaO4 � @minitech
�����������
Perl 18
����� ������������: 18 �������� � ����� ������:
��� ������ �� ������� � ���������:
��� �������� ���������, �� ������������ ��������� | (���) �� ^ (xor) ����� �� ��������� ����� ���� ����������� ��� toLower , toUpper ��� swapCase :
perl -pe ‘s / [az] / $ & amp; ^ «» / eg’ & lt; & lt; & lt; «����� . @ � \` � [\] ^ _ � <|>DEL? » �� ������ . @ TO` � [\] ^ _ TO <|>DEL?
� swapCase (18 + 1 = 19 ��������) :
�����������
DELPHI
�����������
Python (33)
� ������ �������� ����������� ��������.
� ���������, ��� ��� �� ������, ��� ������� Lego.
�����������
NASM — OSX i386 — 312
������������, � ��������.
��������� ������ ������ ������� ��������� i386 — ��� SSE, ��� ��������. � ��� �������� ������� gets () � put () �� ������ �������������� libc. � �����, ��� ���� ������ � ����� ������, �� � ����� ������.
������� � ��������� (������������ Linux, ��. ����), ��������� ��� � ���� � ������ lower.s, ����� ���������:
- ��� -���- ������ � Linux: �������� macho �� elf32 � ������� -Wl, -no_pie . ��� ����� ������������ �������� _gets �� get, _puts �� put � _main �� main.
- �� ����� ������������ ����� ����� 9000 ��������, ����� ��� ������������ ������.
�����������
PHP (42)
������ �� ��������� ������:
-R � ��������� ������� �� �����������.
�����������
PowerShell: 69 65 64
� �������� ��������� �������� ��������� Replace �������� ���, ��� � ���� ��� ������������� �������� ���������� [regex] :: Replace , �� ��� �� �������. ���� � ����-�� ���� ������������� � ���, ��� ����� ���������, ���������� ���.
��� ��� ���� � �����:
���������� �� ���������:
- ������� ��������� ��������, ��� ��� [int] ������ �� ���������, �������� ����������� � ������������.
����������:
(read-host) �������� ���������������� ����.
[regex] :: Replace ( . ) ��������� PowerShell ������������ ������������� RegEx ��� ���������� �������� ������ �� ������.
«[AZ]» ������������� ���� ��������� ������.
< . >��������� PowerShell ������������ �������� ��� ����������� �������� ������.
[char] «$ args» ��������� ������� ���������� � ������ ��� ��� ASCII-������.
32 + ����������� ������ � ����� �����, �������������� ��� ASCII, � n ����������� �������� �� 32, ��� ������������� ASCII-���� ��������������� �������� �����.
[char] ( . ) ��������� ���������� �������� � ����������� ��� ������� � ������ ASCII.
(������� ������ �������������� — �������� ��� �� �����������.)
mb_strtolower
(PHP 4 >= 4.3.0, PHP 5)
mb_strtolower � ���������� ������ � ������� ��������
��������
���������� ������ str , ��������� ������� � ������� ��������� � ������� ��������.
������ ����������
�������� encoding ������������ ����� ���������� ���������. ���� �� ������, ������ ���� ����� ������������ �������� ���������� ���������.
������������ ��������
str , ����� � ������� ��������� � ������� ��������.
������
�� �������������� ����������� � ��������� ������� ����������� � � http://www.unicode.org/unicode/reports/tr21/.
� ������� �� strtolower() , �� ��� ������ �������� ������ ������������ �� ��������� ������� ������� �������. ����� ������� �� ��������� ������� �� ������ ������������ ��������� �������, � ����� ������� ����� ��������������� �������, ������� ��������� �����������, ����� ��� �-������ (A).
�������
������ #1 ������ ������������� mb_strtolower()
������ #2 ������ ������������� mb_strtolower() � ������������ �������
�������� �����
- mb_strtoupper() — ���������� ������ � �������� ��������
- mb_convert_case() — ���������� ����� �������� �������� � ������
- strtolower() — ����������� ������ � ������ �������
���������� �� PHP : ������� ������ � ������� : ��������� ������� : ������� ��������� ��������
�������� �� WebWikiABCD
����������
strtolower
���������� �������������� �������� ������ � ������ �������.
����������� ������ � ������ �������. ���������� ��������� ��������.
���� ��������, ��� ��� ������������ ��������� ������ ������� ����� ��������, ����� ������, �������� ���������� ��� ������ � ������� ���������.
strtoupper
���������� �������������� �������� ������ � ������� �������.
��������� ������ � ������� �������. ���������� ��������� ��������������. ��� ������� ������ �������� � ����������� �������, �� � �������� ����� ������.
ucfirst
���������� �������������� ������� ������� ������ � ������� �������.
���������� ������, � ������� ������ ������ ���������.
������� ��������� ����� ���� ����������� ��������������.
ucwords
���������� �������������� ������� ������� ������� ����� ������ � ������� �������.
���������� ������, � ������� ������ ������ ������� ����� � ������ ���������.
��� ������ ����� ���������� ������� ������, �������� ������������ ���������� ������: ������, ������� �� ����� ������, �������� ��������, ������� �������, �������������� � ������������ ���������.
������� ��������� ����� ���� ����������� ��������������.
strtolower
strtolower — Преобразует строку в нижний регистр
Описание
Возвращает строку string , в которой все буквенные символы переведены в нижний регистр.
Принадлежность того или иного символа к буквенным определяется с учетом текущей локали. Это означает, что, например, в используемой по умолчанию локали «C» locale, символ Ä не будет преобразован.
Example#1 Пример использования strtolower()
Note: Эта функция безопасна для обработки данных в двоичной форме.