24 lines
430 B
C++
24 lines
430 B
C++
#ifndef _H_LIBCP_IO_PRINT
|
|
#define _H_LIBCP_IO_PRINT
|
|
|
|
#include <format/fmt.hpp>
|
|
|
|
extern "C" {
|
|
int puts(const char* s);
|
|
int putchar(int c);
|
|
}
|
|
|
|
template <typename... Types>
|
|
void print(const char* fmt, Types... args) {
|
|
String s = format(fmt, args...);
|
|
puts(s.as_cstr());
|
|
}
|
|
|
|
template <typename... Types>
|
|
void println(const char* fmt, Types... args) {
|
|
print(fmt, args...);
|
|
putchar('\n');
|
|
}
|
|
|
|
#endif // !_H_LIBCP_IO_PRINT
|