codebrainz commented on this pull request.
+} Placeholder;
+ + +static const gchar *placeholder_replacement(Placeholder *placeholders, size_t n_placeholders, gchar placeholder) +{ + for (size_t i = 0; i < n_placeholders; i++) + { + if (placeholders[i].placeholder == placeholder) + return placeholders[i].replacement; + } + + return NULL; +} + + +/* Replaces %s-style placeholders in a string.
Just out of curiosity, why not using template-style placeholders and re-using the template replacement code?