Mercurial > libavutil.hg
diff avstring.h @ 369:2cd0add8ac0c libavutil
Implement av_strlcatf(): a strlcat which adds a printf style formatted string
author | lucabe |
---|---|
date | Thu, 19 Jul 2007 06:36:02 +0000 |
parents | 2fb35d82b0bd |
children | 997894c973e2 |
line wrap: on
line diff
--- a/avstring.h Wed Jul 18 12:22:07 2007 +0000 +++ b/avstring.h Thu Jul 19 06:36:02 2007 +0000 @@ -73,4 +73,18 @@ */ size_t av_strlcat(char *dst, const char *src, size_t size); +/** + * Append output to a string, according to a format. Never write out of + * the destination buffer, and and always put a terminating 0 within + * the buffer. + * @param dst destination buffer (string to which the output is + * appended) + * @param size total size of the destination buffer + * @param fmt printf-compatible format string, specifying how the + * following parameters are used + * @return the length of the string that would have been generated + * if enough space had been available + */ +size_t av_strlcatf(char *dst, size_t size, const char *fmt, ...); + #endif /* AVUTIL_STRING_H */