lib/core: Added simple write char method to `Writer`
authorLucas Bajolet <r4pass@hotmail.com>
Fri, 29 Apr 2016 17:10:03 +0000 (13:10 -0400)
committerLucas Bajolet <r4pass@hotmail.com>
Tue, 3 May 2016 01:59:34 +0000 (21:59 -0400)
Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

lib/core/stream.nit

index 8a75543..5ad8d75 100644 (file)
@@ -417,6 +417,9 @@ abstract class Writer
        # Write a single byte
        fun write_byte(value: Byte) is abstract
 
+       # Writes a single char
+       fun write_char(c: Char) do write(c.to_s)
+
        # Can the stream be used to write
        fun is_writable: Bool is abstract
 end