Go to file
Chris dea0fc5228 Initial commit 2016-03-17 00:11:31 +01:00
examples Initial commit 2016-03-17 00:11:31 +01:00
lib Initial commit 2016-03-17 00:11:31 +01:00
.gitignore Initial commit 2016-03-17 00:11:31 +01:00
README.md Initial commit 2016-03-17 00:11:31 +01:00
composer.json Initial commit 2016-03-17 00:11:31 +01:00

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");