aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/avstring.h
diff options
context:
space:
mode:
authorLuca Abeni <lucabe72@email.it>2007-07-19 06:36:02 +0000
committerLuca Abeni <lucabe72@email.it>2007-07-19 06:36:02 +0000
commit1e7f363804cb9fbe4eb8193a5711fdfd00619776 (patch)
treecba94cac733a19f0e83180acd7ff6e2739712439 /libavutil/avstring.h
parent614e9b24245528c28288b0b17898b130db5aab77 (diff)
downloadffmpeg-1e7f363804cb9fbe4eb8193a5711fdfd00619776.tar.gz
Implement av_strlcatf(): a strlcat which adds a printf style formatted string
Originally committed as revision 9753 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/avstring.h')
-rw-r--r--libavutil/avstring.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libavutil/avstring.h b/libavutil/avstring.h
index bc24ea14d1..f25dd31d03 100644
--- a/libavutil/avstring.h
+++ b/libavutil/avstring.h
@@ -73,4 +73,18 @@ size_t av_strlcpy(char *dst, const char *src, size_t size);
*/
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 */