summaryrefslogtreecommitdiff
path: root/src/common/stringx.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2006-01-26 09:54:31 +0000
committerStef Walter <stef@memberwebs.com>2006-01-26 09:54:31 +0000
commit1ded2732d4c290dbff64d8091def1f70b76f6282 (patch)
tree4aa4dfa403304e9ee59cce693263ca607b36502f /src/common/stringx.c
parent7fcead4473bc224bc8c6a66e2db3b3ee87f751d4 (diff)
SNMP support coded in.
Diffstat (limited to 'src/common/stringx.c')
-rw-r--r--src/common/stringx.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/common/stringx.c b/src/common/stringx.c
index 06e4879..89deb9b 100644
--- a/src/common/stringx.c
+++ b/src/common/stringx.c
@@ -108,3 +108,17 @@ int strtob(const char* str)
return -1;
}
+
+size_t
+strlcpy(char *dst, const char *src, size_t len)
+{
+ size_t ret = strlen(dst);
+
+ while (len > 1) {
+ *dst++ = *src++;
+ len--;
+ }
+ if (len > 0)
+ *dst = '\0';
+ return (ret);
+}