Changeset b888d5f in mainline for kernel/generic/include/string.h
- Timestamp:
- 2009-04-03T07:52:29Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 043eca0
- Parents:
- 7ce3cb2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/string.h
r7ce3cb2 rb888d5f 38 38 #include <typedefs.h> 39 39 40 #define UTF8_NO_LIMIT ((size_t) -1) 40 #define STR_NO_LIMIT ((size_t) -1) 41 42 /**< Maximum size of a string containing cnt characters */ 43 #define STR_BOUNDS(cnt) (cnt << 2) 41 44 42 45 extern char invalch; 43 46 44 extern wchar_t chr_decode(const char *, size_t *, size_t); 45 extern int chr_encode(wchar_t, char *, size_t *, size_t); 46 extern count_t chr_width(wchar_t); 47 extern wchar_t str_decode(const char *str, size_t *offset, size_t sz); 48 extern int chr_encode(const wchar_t ch, char *str, size_t *offset, size_t sz); 47 49 48 extern size_t str_size(const char *); 49 extern size_t str_lsize(const char *, count_t); 50 extern size_t str_wsize(const char *, count_t); 50 extern size_t str_size(const char *str); 51 extern size_t wstr_size(const wchar_t *str); 51 52 52 extern count_t str_length(const char *); 53 extern count_t wstr_length(const wchar_t *); 54 extern count_t wstr_wlength(const wchar_t *, count_t); 53 extern size_t str_lsize(const char *str, count_t max_len); 54 extern size_t wstr_lsize(const wchar_t *str, count_t max_len); 55 56 extern count_t str_length(const char *str); 57 extern count_t wstr_length(const wchar_t *wstr); 58 59 extern count_t str_nlength(const char *str, size_t size); 60 extern count_t wstr_nlength(const wchar_t *str, size_t size); 55 61 56 62 extern bool ascii_check(const wchar_t ch); 57 extern bool unicode_check(const wchar_t ch);63 extern bool chr_check(const wchar_t ch); 58 64 59 extern int strcmp(const char *src, const char *dst); 60 extern int strncmp(const char *src, const char *dst, size_t len); 61 extern void strncpy(char *dest, const char *src, size_t len); 65 extern int str_cmp(const char *s1, const char *s2); 66 extern int str_lcmp(const char *s1, const char *s2, count_t max_len); 62 67 63 extern char *strchr(const char *s, int i); 68 extern void str_ncpy(char *dst, const char *src, size_t size); 69 extern void wstr_nstr(char *dst, const wchar_t *src, size_t size); 70 71 extern const char *str_chr(const char *str, wchar_t ch); 72 73 extern bool wstr_linsert(wchar_t *str, wchar_t ch, count_t pos, count_t max_pos); 74 extern bool wstr_remove(wchar_t *str, count_t pos); 64 75 65 76 #endif
Note:
See TracChangeset
for help on using the changeset viewer.