Added U() as alias for uchr()

This commit is contained in:
Chris 2016-10-30 13:19:31 +01:00
parent dea0fc5228
commit 5e412a8e76
2 changed files with 7 additions and 0 deletions

View File

@ -11,3 +11,5 @@ uprintf("\u2581\u2582\u2583\u2584\u2585\u2586\u2587\u2589 \u2591\u2592\u2593\u25
uprintf("\u2610 Unchecked box\n");
uprintf("\u2611 Checked box\n");
uprintf("\u2612 Crossed out box\n");
echo "This ".U(0x2585)." is a test\n";

View File

@ -13,6 +13,11 @@ class UnicodeShim
return json_decode('"'.'\u'.dechex($ord).'"');
}
function U($ord)
{
return uchr($ord);
}
function uprintf($arg)
{
$str = call_user_func_array('sprintf', func_get_args());