Luna/luna/include/luna/Format.h
apio 814672c771
All checks were successful
continuous-integration/drone/push Build is passing
Remove some redundant error propagation
Why can printing to the serial port or format onto a string fail?
Even if cstyle_format returns Result<usize>, we shouldn't always follow suit.
2022-12-16 18:32:29 +01:00

10 lines
374 B
C

#pragma once
#include <luna/Attributes.h>
#include <luna/Result.h>
#include <stdarg.h>
typedef Result<void> (*callback_t)(char, void*);
Result<usize> cstyle_format(const char* format, callback_t callback, void* arg, va_list ap);
usize vstring_format(char* buf, usize max, const char* format, va_list ap);
usize string_format(char* buf, usize max, const char* format, ...);