mb_strtoupper

(PHP 4 >= 4.3.0, PHP 5, PHP 7)

mb_strtoupper — ʹ�ַ�����д

˵��

mb_strtoupper ( string $str [, string $encoding = mb_internal_encoding() ] ) : string

�����е���ĸ�ַ�ת���ɴ�д������ str��

����

str

Ҫ��д�� string��

encoding

encoding ����Ϊ�ַ����롣���ʡ�ԣ���ʹ���ڲ��ַ����롣

����ֵ

str �����е���ĸ��ת���ɴ�д�ġ�

Unicode

���� Unicode ���Ե���Ϣ����μ� » http://www.unicode.org/unicode/reports/tr21/��

�� strtoupper() ��ͬ���ǣ�"��ĸ"��ͨ�� Unicode �ַ�������ȷ���ġ� �������������������Ի�����locale������Ӱ�죬�ܹ�ת���κξ���"��ĸ"���Ե��ַ������� a �������ţ�?����

����

Example #1 mb_strtoupper() ����

<?php
$str 
= "Mary Had A Little Lamb and She LOVED It So";
$str = mb_strtoupper($str);
echo 
$str; // Prints MARY HAD A LITTLE LAMB AND SHE LOVED IT SO
?>

Example #2 ������ UTF-8 �ı��� mb_strtoupper() ����

<?php
$str 
= "��?�֦ɦҦӦ� ����?�ЦǦ� �¦���?? �צǦ�?�ͦ� �æ�, �ĦѦ��ҦʦŦ�?�ƦŦ� �Ԧ�?�� �ͦئȦѦ�? �ʦԦ�??";
$str = mb_strtoupper($str, 'UTF-8');
echo 
$str; // ��ӡ�� ��?���������� ����?������ ������?�� ������?���� ����, ��������������?������ ����?�� ����������? ������?��
?>

�μ�