- mb_substr: documentation ( source)
- mb_strtoupper: documentation ( source)
- mb_strtolower: documentation ( source)
<?php
function doIt($string, $charset) {
echo mb_strtoupper(mb_substr($string, 0, 1, $charset), $charset).mb_strtolower(mb_substr($string, 1, 2147483647, $charset), $charset), "\n";
}
doIt('abcd', 'UTF-8');
doIt('abcd', 'ASCII');
doIt('abcd', 'ISO-8859-15');