You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Noccy 5e412a8e76 Added U() as alias for uchr() 6 years ago
examples Added U() as alias for uchr() 6 years ago
lib Added U() as alias for uchr() 6 years ago
.gitignore Initial commit 7 years ago
README.md Initial commit 7 years ago
composer.json Initial commit 7 years ago

README.md

noccylabs/unicode

This library adds support for writing unicode characters to the console. It will register a number of global functions for this purpose:

  • uchr($numeric) - Returns the unicode character matching the numeric argument.
  • uprintf($fmt, $arg..) - A wrapper for printf that enables \u to embed unicode strings.
  • usprintf($fmt, $arg..) - A wrapper like uprintf but for sprintf.

Examples

To output a specific UTF-8 glyph:

echo uchr(0x1000)

The same thing in a printf fashion:

uprintf("Unicode glyph x1000: \u1000");