summaryrefslogtreecommitdiff
path: root/bittorrent/mbtstr/src/pushcstr.c
diff options
context:
space:
mode:
Diffstat (limited to 'bittorrent/mbtstr/src/pushcstr.c')
-rw-r--r--bittorrent/mbtstr/src/pushcstr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/bittorrent/mbtstr/src/pushcstr.c b/bittorrent/mbtstr/src/pushcstr.c
new file mode 100644
index 0000000..d15776e
--- /dev/null
+++ b/bittorrent/mbtstr/src/pushcstr.c
@@ -0,0 +1,11 @@
+#include "mbtstr/str.h"
+
+bool mbt_str_pushcstr(struct mbt_str *str, const char *cstr)
+{
+ if (cstr == NULL)
+ return false;
+ for (size_t i = 0; cstr[i]; i++)
+ if (!mbt_str_pushc(str, cstr[i]))
+ return false;
+ return true;
+}