4 * Copyright (C) 1991, 1992 Linus Torvalds
8 * stupid library routines.. The optimized versions should generally be found
9 * as inline code in <asm-xx/string.h>
11 * These are buggy as well..
13 * * Fri Jun 25 1999, Ingo Oeser <ioe@informatik.tu-chemnitz.de>
14 * - Added strsep() which will replace strtok() soon (because strsep() is
15 * reentrant and should be faster). Use only strsep() in new code, please.
17 * * Sat Feb 09 2002, Jason Thomas <jason@topic.com.au>,
18 * Matthew Hawkins <matt@mh.dropbear.id.au>
19 * - Kissed strtok() goodbye
26 #include <linux/compiler.h>
27 #include <linux/string.h>
29 static char *skip_spaces(const char *str)
46 while (end >= s && isspace(*end))
50 return skip_spaces(s);
53 size_t strlcpy(char *dest, const char *src, size_t size)
55 size_t ret = strlen(src);
58 size_t len = (ret >= size) ? size - 1 : ret;
59 memcpy(dest, src, len);
65 void memzero_explicit(void *s, size_t count)
71 int match_string(const char * const *array, size_t n, const char *string)
76 for (index = 0; index < n; index++) {
80 if (!strcmp(item, string))