Add example of formatted C string for string in M_LET
This commit is contained in:
1 parent
ce2adea6c0
commit
77813adc00
1 file changed
+4
@@ -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) );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user