Luna/luna/Format.h

10 lines
382 B
C
Raw Normal View History

2022-11-19 11:30:36 +00:00
#pragma once
#include <Attributes.h>
2022-11-19 15:13:25 +00:00
#include <Result.h>
2022-11-19 11:30:36 +00:00
#include <stdarg.h>
2022-11-19 15:13:25 +00:00
typedef Result<void> (*callback_t)(char, void*);
2022-11-19 14:53:58 +00:00
2022-11-30 11:36:21 +00:00
Result<usize> cstyle_format(const char* format, callback_t callback, void* arg, va_list ap);
Result<usize> vstring_format(char* buf, size_t max, const char* format, va_list ap);
Result<usize> string_format(char* buf, size_t max, const char* format, ...);