From 77813adc0001c96511aa932ced1adc8500b3f280 Mon Sep 17 00:00:00 2001 From: Patrick Pelissier Date: Thu, 21 May 2020 11:55:35 +0200 Subject: [PATCH] Add example of formatted C string for string in M_LET --- example/ex-multi05.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/example/ex-multi05.c b/example/ex-multi05.c index db2ee616..da78e802 100644 --- a/example/ex-multi05.c +++ b/example/ex-multi05.c @@ -20,6 +20,10 @@ int main(void) // Also add a space character string_push_back(str, ' '); } + // Let's define another string and set it to a formatted value. + M_LET( (count, "\nTo display this it uses \"vector\" of %zu strings!", vector_string_size(msg)), string_t) { + string_cat(str, count); + } // Print the result printf("%s\n", string_get_cstr(str) ); }