Make UEFI boot-platform build again
[haiku.git] / headers / private / fs_shell / fssh_string.h
blobd8aa70c89865715e37f1a1538b7106132800c7b5
1 /*
2 * Copyright 2004-2007, Haiku Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef _FSSH_STRING_H
6 #define _FSSH_STRING_H
9 #include "fssh_defs.h"
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
17 /* memXXX() functions */
18 extern void *fssh_memchr(const void *source, int value, fssh_size_t length);
19 extern int fssh_memcmp(const void *buffer1, const void *buffer2,
20 fssh_size_t length);
21 extern void *fssh_memcpy(void *dest, const void *source,
22 fssh_size_t length);
23 extern void *fssh_memccpy(void *dest, const void *source, int stopByte,
24 fssh_size_t length);
25 extern void *fssh_memmove(void *dest, const void *source,
26 fssh_size_t length);
27 extern void *fssh_memset(void *dest, int value, fssh_size_t length);
29 /* string functions */
30 extern char *fssh_strcpy(char *dest, const char *source);
31 extern char *fssh_strncpy(char *dest, const char *source,
32 fssh_size_t length);
33 extern char *fssh_strcat(char *dest, const char *source);
34 extern char *fssh_strncat(char *dest, const char *source,
35 fssh_size_t length);
37 extern fssh_size_t fssh_strlen(const char *string);
38 extern int fssh_strcmp(const char *string1, const char *string2);
39 extern int fssh_strncmp(const char *string1, const char *string2,
40 fssh_size_t length);
42 extern char *fssh_strchr(const char *string, int character);
43 extern char *fssh_strrchr(const char *string, int character);
44 extern char *fssh_strstr(const char *string, const char *searchString);
46 extern char *fssh_strchrnul(const char *string, int character);
47 // this is a GNU extension
49 extern char *fssh_strpbrk(const char *string, const char *set);
50 extern char *fssh_strtok(char *string, const char *set);
51 extern char *fssh_strtok_r(char *string, const char *set,
52 char **savePointer);
53 extern fssh_size_t fssh_strspn(const char *string, const char *set);
54 extern fssh_size_t fssh_strcspn(const char *string, const char *set);
56 extern int fssh_strcoll(const char *string1, const char *string2);
57 extern fssh_size_t fssh_strxfrm(char *string1, const char *string2,
58 fssh_size_t length);
60 extern char *fssh_strerror(int errorCode);
61 extern int fssh_strerror_r(int errorCode, char *buffer,
62 fssh_size_t bufferSize);
64 /* non-standard string functions */
65 extern int fssh_strcasecmp(const char *string1, const char *string2);
66 extern int fssh_strncasecmp(const char *string1, const char *string2,
67 fssh_size_t length);
69 extern char *fssh_strcasestr(const char *string, const char *searchString);
71 extern char *fssh_strdup(const char *string);
72 extern char *fssh_stpcpy(char *dest, const char *source);
73 extern const char *fssh_strtcopy(char *dest, const char *source);
75 extern fssh_size_t fssh_strlcat(char *dest, const char *source,
76 fssh_size_t length);
77 extern fssh_size_t fssh_strlcpy(char *dest, const char *source,
78 fssh_size_t length);
80 extern fssh_size_t fssh_strnlen(const char *string, fssh_size_t count);
82 extern int fssh_ffs(int i);
83 extern char *fssh_index(const char *s, int c);
84 extern char *fssh_rindex(char const *s, int c);
87 #ifdef __cplusplus
89 #endif
91 #endif /* _FSSH_STRING_H */