@techee commented on this pull request.
> + * @brief Replace %-placeholders in a string + * @param str Format string including placeholders + * @param insert_replacement Callback function to insert placeholder replacements. + * It gets called with the buffer to which append the + * replacement, the placeholder character, and @p data. + * It should return whether the placeholder was handled + * or not. + * @param data User data to pass to the @p insert_replacement + * @returns A copy of @p str with placeholders replaced + * + * Replaces arbitrary placeholders in a printf-style format string. Unknown + * placeholders are left unmodified in the resulting string. + * There is one special placeholder that is always handled and replaced, that + * is `%`: it is replaced with a literal "%"; that is `%%` results in `%`. + */ +GEANY_EXPORT_SYMBOL Without having a look at the rest of the patch in detail - nice! I could have used it in https://github.com/geany/geany-plugins/pull/1432 and it's nice users can expect the same beavior across Geany and plugins. Reminder: will require API bump. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/4318#pullrequestreview-2885549356 You are receiving this because you are subscribed to this thread. Message ID: <geany/geany/pull/4318/review/2885549...@github.com>