diff options
Diffstat (limited to 'src/nvim/strings.c')
-rw-r--r-- | src/nvim/strings.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/nvim/strings.c b/src/nvim/strings.c index 2de65391cc..818e67b32d 100644 --- a/src/nvim/strings.c +++ b/src/nvim/strings.c @@ -9,6 +9,8 @@ #include <string.h> #include "auto/config.h" +#include "nvim/api/private/defs.h" +#include "nvim/api/private/helpers.h" #include "nvim/ascii_defs.h" #include "nvim/assert_defs.h" #include "nvim/charset.h" @@ -20,12 +22,12 @@ #include "nvim/garray.h" #include "nvim/garray_defs.h" #include "nvim/gettext_defs.h" -#include "nvim/globals.h" #include "nvim/macros_defs.h" #include "nvim/math.h" #include "nvim/mbyte.h" #include "nvim/mbyte_defs.h" #include "nvim/memory.h" +#include "nvim/memory_defs.h" #include "nvim/message.h" #include "nvim/option.h" #include "nvim/plines.h" @@ -496,20 +498,6 @@ char *vim_strchr(const char *const string, const int c) } } -// Sized version of strchr that can handle embedded NULs. -// Adjusts n to the new size. -char *strnchr(const char *p, size_t *n, int c) -{ - while (*n > 0) { - if (*p == c) { - return (char *)p; - } - p++; - (*n)--; - } - return NULL; -} - // Sort an array of strings. static int sort_compare(const void *s1, const void *s2) |