Skip to content

Instantly share code, notes, and snippets.

@qwersk
Created September 8, 2017 03:34
Show Gist options
  • Save qwersk/33ebedea2c6df33231f84547ae735a53 to your computer and use it in GitHub Desktop.
Save qwersk/33ebedea2c6df33231f84547ae735a53 to your computer and use it in GitHub Desktop.
Ucfirst analogue for utf-8 #PHP
<?php
mb_internal_encoding("UTF-8");
function mb_ucfirst($text) {
return mb_strtoupper(mb_substr($text, 0, 1)) . mb_substr($text, 1);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment