summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2019-02-26 19:48:44 +0300
committerIgor Sysoev <igor@sysoev.ru>2019-02-26 19:48:44 +0300
commit95c9bba33bcb1d0e8e9e7c64d2591187ce11bab1 (patch)
tree83ef96cee21d921a536a5636558f8c97230bc24c /src
parentce650ea0f703f9228638e88ccb62d207aa647bf2 (diff)
downloadunit-95c9bba33bcb1d0e8e9e7c64d2591187ce11bab1.tar.gz
unit-95c9bba33bcb1d0e8e9e7c64d2591187ce11bab1.tar.bz2
Introduced nxt_memcpy_upcase().
Diffstat (limited to 'src')
-rw-r--r--src/nxt_string.c13
-rw-r--r--src/nxt_string.h2
2 files changed, 15 insertions, 0 deletions
diff --git a/src/nxt_string.c b/src/nxt_string.c
index 1858b58b..7d8c1ce3 100644
--- a/src/nxt_string.c
+++ b/src/nxt_string.c
@@ -96,6 +96,19 @@ nxt_memcpy_lowcase(u_char *dst, const u_char *src, size_t length)
}
+void
+nxt_memcpy_upcase(u_char *dst, const u_char *src, size_t length)
+{
+ u_char c;
+
+ while (length != 0) {
+ c = *src++;
+ *dst++ = nxt_upcase(c);
+ length--;
+ }
+}
+
+
u_char *
nxt_cpystrn(u_char *dst, const u_char *src, size_t length)
{
diff --git a/src/nxt_string.h b/src/nxt_string.h
index 5f82cca8..22a63a17 100644
--- a/src/nxt_string.h
+++ b/src/nxt_string.h
@@ -43,6 +43,8 @@ nxt_memcpy(dst, src, length) \
NXT_EXPORT void nxt_memcpy_lowcase(u_char *dst, const u_char *src,
size_t length);
+NXT_EXPORT void nxt_memcpy_upcase(u_char *dst, const u_char *src,
+ size_t length);
/*