aboutsummaryrefslogtreecommitdiff
path: root/src/common/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/string.c')
-rw-r--r--src/common/string.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/common/string.c b/src/common/string.c
index 901821f3d87..159d9ea7b62 100644
--- a/src/common/string.c
+++ b/src/common/string.c
@@ -41,23 +41,3 @@ pg_str_endswith(const char *str, const char *end)
str += slen - elen;
return strcmp(str, end) == 0;
}
-
-
-/*
- * Portable version of posix' strnlen.
- *
- * Returns the number of characters before a null-byte in the string pointed
- * to by str, unless there's no null-byte before maxlen. In the latter case
- * maxlen is returned.
- */
-#ifndef HAVE_STRNLEN
-size_t
-pg_strnlen(const char *str, size_t maxlen)
-{
- const char *p = str;
-
- while (maxlen-- > 0 && *p)
- p++;
- return p - str;
-}
-#endif