2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2009, 2010 Free Software Foundation, Inc.
5 * GRUB is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * GRUB is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef GRUB_POSIX_STRING_H
20 #define GRUB_POSIX_STRING_H 1
22 #include <grub/misc.h>
24 static inline grub_size_t
25 strlen (const char *s
)
27 return grub_strlen (s
);
31 strcmp (const char *s1
, const char *s2
)
33 return grub_strcmp (s1
, s2
);
37 strcasecmp (const char *s1
, const char *s2
)
39 return grub_strcasecmp (s1
, s2
);
44 memcpy (void *dest
, const void *src
, grub_size_t n
)
46 return grub_memcpy (dest
, src
, n
);
50 memcmp (const void *s1
, const void *s2
, size_t n
)
52 return grub_memcmp (s1
, s2
, n
);
58 strcpy (char *dest
, const char *src
)
60 return grub_strcpy (dest
, src
);
64 strstr (const char *haystack
, const char *needle
)
66 return grub_strstr (haystack
, needle
);
70 strchr (const char *s
, int c
)
72 return grub_strchr (s
, c
);
76 strncpy (char *dest
, const char *src
, size_t n
)
78 return grub_strncpy (dest
, src
, n
);
82 strcat (char *dest
, const char *src
)
84 return grub_strcat (dest
, src
);
88 strncat (char *dest
, const char *src
, size_t n
)
90 return grub_strncat (dest
, src
, n
);
94 strcoll (const char *s1
, const char *s2
)
96 return grub_strcmp (s1
, s2
);
100 memchr (const void *s
, int c
, size_t n
)
102 return grub_memchr (s
, c
, n
);