summaryrefslogtreecommitdiff
path: root/bittorrent/mbtstr/src/pushcv.c
diff options
context:
space:
mode:
Diffstat (limited to 'bittorrent/mbtstr/src/pushcv.c')
-rw-r--r--bittorrent/mbtstr/src/pushcv.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/bittorrent/mbtstr/src/pushcv.c b/bittorrent/mbtstr/src/pushcv.c
new file mode 100644
index 0000000..7f21562
--- /dev/null
+++ b/bittorrent/mbtstr/src/pushcv.c
@@ -0,0 +1,10 @@
+#include "mbtstr/str.h"
+#include "mbtstr/view.h"
+
+bool mbt_str_pushcv(struct mbt_str *str, struct mbt_cview view)
+{
+ for (size_t i = 0; i < view.size; i++)
+ if (!mbt_str_pushc(str, view.data[i]))
+ return false;
+ return true;
+}