Changes in uspace/lib/c/include/str.h [1737bfb:933cadf] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/include/str.h
r1737bfb r933cadf 1 1 /* 2 2 * Copyright (c) 2005 Martin Decky 3 * Copyright (c) 2011 Oleg Romanenko4 3 * All rights reserved. 5 4 * … … 49 48 #define STR_BOUNDS(length) ((length) << 2) 50 49 51 /**52 * Maximum size of a buffer needed to a string converted from space-padded53 * ASCII of size @a spa_size using spascii_to_str().54 */55 #define SPASCII_STR_BUFSIZE(spa_size) ((spa_size) + 1)56 57 50 extern wchar_t str_decode(const char *str, size_t *offset, size_t sz); 58 51 extern int chr_encode(const wchar_t ch, char *str, size_t *offset, size_t sz); … … 80 73 extern void str_append(char *dest, size_t size, const char *src); 81 74 82 extern int spascii_to_str(char *dest, size_t size, const uint8_t *src, size_t n);83 75 extern void wstr_to_str(char *dest, size_t size, const wchar_t *src); 84 76 extern char *wstr_to_astr(const wchar_t *src); 85 77 extern void str_to_wstr(wchar_t *dest, size_t dlen, const char *src); 86 extern wchar_t *str_to_awstr(const char *src);87 extern int utf16_to_str(char *dest, size_t size, const uint16_t *src);88 extern int str_to_utf16(uint16_t *dest, size_t size, const char *src);89 78 90 79 extern char *str_chr(const char *str, wchar_t ch); 91 80 extern char *str_rchr(const char *str, wchar_t ch); 92 93 extern void str_rtrim(char *str, wchar_t ch);94 extern void str_ltrim(char *str, wchar_t ch);95 81 96 82 extern bool wstr_linsert(wchar_t *str, wchar_t ch, size_t pos, size_t max_pos); … … 100 86 extern char *str_ndup(const char *, size_t max_size); 101 87 102 extern int str_uint8_t(const char *, char **, unsigned int, bool, uint8_t *);103 extern int str_uint16_t(const char *, char **, unsigned int, bool, uint16_t *);104 extern int str_uint32_t(const char *, char **, unsigned int, bool, uint32_t *);105 88 extern int str_uint64(const char *, char **, unsigned int, bool, uint64_t *); 106 89 extern int str_size_t(const char *, char **, unsigned int, bool, size_t *);
Note:
See TracChangeset
for help on using the changeset viewer.