readc

Synopsis

$ readc([$handle])

reads a single unicode character from the specified handle

Parameters

$handle - the handle to read from (defaults to stdin/stdout)

Returns

a scalar string with the character read. If no character is read then $null is returned instead.

Examples

$handle = openf("data.cp437.txt"); setEncoding($handle, "cp437"); println("Read: " . readc($handle));

Read: a

See Also