4.53. kink/io/STR_PRINTER

Provides str printers.

4.53.1. STR_PRINTER.new(Newline)

`new` makes a printer which builds a str, with the `Newline`.

Precondition:

• `Newline` must be a str

The result printer also has `str` method, which returns the built str.

Example:

:STR_PRINTER.require_from('kink/io/')

:P <- STR_PRINTER.new("\r\n")
P.print_line('foo')
P.print_line('bar')
stdout.print_line(P.str.repr) # => "foo\r\nbar\r\n"