Changes in uspace/lib/c/generic/str.c [b48d046:dcb74c0a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/str.c
rb48d046 rdcb74c0a 2 2 * Copyright (c) 2005 Martin Decky 3 3 * Copyright (c) 2008 Jiri Svoboda 4 * Copyright (c) 2011 Martin Sucha5 4 * All rights reserved. 6 5 * … … 719 718 720 719 dest[dlen - 1] = '\0'; 721 }722 723 /** Convert string to wide string.724 *725 * Convert string @a src to wide string. A new wide NULL-terminated726 * string will be allocated on the heap.727 *728 * @param src Source string.729 */730 wchar_t *str_to_awstr(const char *str)731 {732 size_t len = str_length(str);733 734 wchar_t *wstr = calloc(len+1, sizeof(wchar_t));735 if (wstr == NULL)736 return NULL;737 738 str_to_wstr(wstr, len + 1, str);739 return wstr;740 720 } 741 721
Note:
See TracChangeset
for help on using the changeset viewer.