1 public import deimos
.ncurses
;
2 private import std
.string
: toStringz
;
5 private pure string
format(T
...)(string s
, T args
) {
6 import std
.array
: appender
;
7 import std
.format
: formattedWrite
;
8 auto w
= appender
!string();
9 formattedWrite(w
, s
, args
);
13 int print(string
...)(string s
, string
[] args
) {
14 foreach (string i
; args
)
17 return printw(toStringz(s
));
20 int printf(T
...)(string s
, T args
) {
21 return printw(toStringz(format(s
, args
)));
24 int mvprint(T
...)(int y
, int x
, string s
, T args
) {
25 foreach (string i
; args
)
28 return mvprintw(y
, x
, toStringz(s
));
31 int mvprintf(T
...)(int y
, int x
, string s
, T args
) {
32 return mvprintw(y
, x
, toStringz(format(s
, args
)));