Subversion Repositories HelenOS

Rev

Rev 4263 | Rev 4581 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4263 Rev 4327
Line 43... Line 43...
43
#define U_BOM          0xfeff
43
#define U_BOM          0xfeff
44
 
44
 
45
/**< No size limit constant */
45
/**< No size limit constant */
46
#define STR_NO_LIMIT  ((size_t) -1)
46
#define STR_NO_LIMIT  ((size_t) -1)
47
 
47
 
48
/**< Maximum size of a string containing cnt characters */
48
/**< Maximum size of a string containing @c length characters */
49
#define STR_BOUNDS(cnt)  (cnt << 2)
49
#define STR_BOUNDS(length)  ((length) << 2)
50
 
50
 
51
extern wchar_t str_decode(const char *str, size_t *offset, size_t sz);
51
extern wchar_t str_decode(const char *str, size_t *offset, size_t sz);
52
extern int chr_encode(const wchar_t ch, char *str, size_t *offset, size_t sz);
52
extern int chr_encode(const wchar_t ch, char *str, size_t *offset, size_t sz);
53
 
53
 
54
extern size_t str_size(const char *str);
54
extern size_t str_size(const char *str);
Line 67... Line 67...
67
extern bool chr_check(wchar_t ch);
67
extern bool chr_check(wchar_t ch);
68
 
68
 
69
extern int str_cmp(const char *s1, const char *s2);
69
extern int str_cmp(const char *s1, const char *s2);
70
extern int str_lcmp(const char *s1, const char *s2, count_t max_len);
70
extern int str_lcmp(const char *s1, const char *s2, count_t max_len);
71
 
71
 
-
 
72
extern void str_cpy(char *dest, size_t size, const char *src);
72
extern void str_ncpy(char *dst, const char *src, size_t size);
73
extern void str_ncpy(char *dest, size_t size, const char *src, size_t n);
-
 
74
extern void str_append(char *dest, size_t size, const char *src);
-
 
75
 
73
extern void wstr_nstr(char *dst, const wchar_t *src, size_t size);
76
extern void wstr_nstr(char *dst, const wchar_t *src, size_t size);
74
 
77
 
75
extern const char *str_chr(const char *str, wchar_t ch);
78
extern const char *str_chr(const char *str, wchar_t ch);
-
 
79
extern const char *str_rchr(const char *str, wchar_t ch);
76
 
80
 
77
extern bool wstr_linsert(wchar_t *str, wchar_t ch, count_t pos, count_t max_pos);
81
extern bool wstr_linsert(wchar_t *str, wchar_t ch, count_t pos, count_t max_pos);
78
extern bool wstr_remove(wchar_t *str, count_t pos);
82
extern bool wstr_remove(wchar_t *str, count_t pos);
79
 
83
 
-
 
84
extern char *str_dup(const char *);
-
 
85
 
80
/*
86
/*
81
 * TODO: Get rid of this.
87
 * TODO: Get rid of this.
82
 */
88
 */
83
 
89
 
84
extern int strcmp(const char *, const char *);
-
 
85
extern int strncmp(const char *, const char *, size_t);
-
 
86
extern int stricmp(const char *, const char *);
90
extern int stricmp(const char *, const char *);
87
 
91
 
88
extern char *strcpy(char *, const char *);
-
 
89
extern char *strncpy(char *, const char *, size_t);
-
 
90
 
-
 
91
extern char *strcat(char *, const char *);
-
 
92
 
-
 
93
extern size_t strlen(const char *);
-
 
94
 
-
 
95
extern char *strdup(const char *);
-
 
96
 
-
 
97
extern char *strchr(const char *, int);
-
 
98
extern char *strrchr(const char *, int);
-
 
99
 
-
 
100
extern long int strtol(const char *, char **, int);
92
extern long int strtol(const char *, char **, int);
101
extern unsigned long strtoul(const char *, char **, int);
93
extern unsigned long strtoul(const char *, char **, int);
102
 
94
 
103
extern char * strtok_r(char *, const char *, char **);
95
extern char * strtok_r(char *, const char *, char **);
104
extern char * strtok(char *, const char *);
96
extern char * strtok(char *, const char *);