Документация PHP


mb_check_encoding

mb_convert_encoding

Multibyte String Функции

PHP Manual


mb_convert_case

(PHP 4 >= 4.3.0, PHP 5)

mb_convert_case — Perform case folding on a string

Описание

string mb_convert_case ( string $str , int $mode [, string $encoding ] )

Performs case folding on a string, converted in the way specified by mode .

Список параметров

str

The string being converted.

mode

The mode of the conversion. It can be one of MB_CASE_UPPER, MB_CASE_LOWER, or MB_CASE_TITLE.

encoding

The encoding parameter is the character encoding. If it is omitted, the internal character encoding value will be used.

Возвращаемые значения

A case folded version of string converted in the way specified by mode .

Unicode

By contrast to the standard case folding functions such as strtolower() and strtoupper(), case folding is performed on the basis of the Unicode character properties. Thus the behaviour of this function is not affected by locale settings and it can convert any characters that have 'alphabetic' property, such as A-umlaut ().

For more information about the Unicode properties, please see » http://www.unicode.org/unicode/reports/tr21/.

Примеры

Пример #1 mb_convert_case() example

<?php
$str 
"mary had a Little lamb and she loved it so";
$str mb_convert_case($strMB_CASE_UPPER"UTF-8");
echo 
$str// Prints MARY HAD A LITTLE LAMB AND SHE LOVED IT SO
$str mb_convert_case($strMB_CASE_TITLE"UTF-8");
echo 
$str// Prints Mary Had A Little Lamb And She Loved It So
?>

Смотрите также


mb_check_encoding

mb_convert_encoding

Multibyte String Функции

PHP Manual

SAPE все усложнил?

MainLink - простая и прибыльная продажа ссылок!

Последние поступления:

Размещена 10 августа 2020 года

Я по ТВ видел, что через 10 лет мы будем жить лучше, чем в Германии...
Я не понял, что это они с Германией сделать хотят?!

читать далее…

ТехЗадание на Землю

Размещена 14 марта 2018 года

Пpоект Genesis (из коpпоpативной пеpеписки)

читать далее…

Шпаргалка по работе с Vim

Размещена 05 декабря 2017 года

Vim довольно мощный редактор, но работа с ним не всегда наглядна.
Например если нужно отредактировать какой-то файл например при помощи crontab, без знания специфики работы с viv никак.

читать далее…

Ошибка: Error: Cannot find a valid baseurl for repo

Размещена 13 сентабря 2017 года

Если возникает ошибка на centos 5 вида
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
Eg. Invalid release/

читать далее…

Linux Optimization

Размещена 30 июля 2012 года

Prelink

читать далее…