nginx-0.0.1-2002-08-06-20:39:45 import
The first code that uses "ngx_" prefix, the previous one used "gx_" prefix.
At that point the code is not yet usable. The first draft ideas are dated
back to 23.10.2001.
diff --git a/src/core/ngx_string.c b/src/core/ngx_string.c
new file mode 100644
index 0000000..9e32b56
--- /dev/null
+++ b/src/core/ngx_string.c
@@ -0,0 +1,21 @@
+
+#include <ngx_config.h>
+#include <ngx_string.h>
+
+
+char *ngx_cpystrn(char *dst, char *src, size_t n)
+{
+ if (n == 0)
+ return dst;
+
+ for (/* void */; --n; dst++, src++) {
+ *dst = *src;
+
+ if (*dst == '\0')
+ return dst;
+ }
+
+ *dst = '\0';
+
+ return dst;
+}