aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/string.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/string.h')
-rw-r--r--src/string.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/string.h b/src/string.h
index 7c16318..e9f2b89 100644
--- a/src/string.h
+++ b/src/string.h
@@ -8,8 +8,20 @@
#ifndef __STRING_H__
#define __STRING_H__
-/* For details, see string_copying(7). */
-char *stpecpy(char *dst, char *end, const char *src);
+/*
+ * This is an implementation for stpecpy.
+ * For details, see string_copying(7).
+ *
+ * You can safely do something like this:
+ *
+ * char buf[128];
+ * char *ptr = buf;
+ *
+ * ptr = string_append(ptr, buf + 128, "random");
+ * ptr = string_append(ptr, buf + 128, "strings");
+ * ptr = string_append(ptr, buf + 128, "can be appended safely");
+ */
+char *string_append(char *dst, char *end, const char *src);
int string_to_int(const char *src, int *result);