aboutsummaryrefslogtreecommitdiff
path: root/src/base/string/raw/ecopy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/string/raw/ecopy.c')
-rw-r--r--src/base/string/raw/ecopy.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/base/string/raw/ecopy.c b/src/base/string/raw/ecopy.c
new file mode 100644
index 0000000..cd812e2
--- /dev/null
+++ b/src/base/string/raw/ecopy.c
@@ -0,0 +1,12 @@
+char *
+str·ecopy(char *dst, char *end, char *src)
+{
+ if(dst > end)
+ return dst;
+
+ while(*src && dst != end)
+ *dst++ = *src++;
+
+ *dst = 0;
+ return dst;
+}