Index: uspace/lib/c/generic/str.c
===================================================================
--- uspace/lib/c/generic/str.c	(revision 9c2c7d2247cc1ad0410cd61ab534af9a246d328b)
+++ uspace/lib/c/generic/str.c	(revision 9ef1fadef604b9c3871bb759de90bf613963a180)
@@ -995,4 +995,24 @@
 	dest[idx] = '\0';
 	return rc;
+}
+
+/** Get size of UTF-16 string.
+ *
+ * Get the number of words which are used by the UTF-16 string @a ustr
+ * (excluding the NULL-terminator).
+ *
+ * @param ustr UTF-16 string to consider.
+ *
+ * @return Number of words used by the UTF-16 string
+ *
+ */
+size_t utf16_wsize(const uint16_t *ustr)
+{
+	size_t wsize = 0;
+
+	while (*ustr++ != 0)
+		wsize++;
+
+	return wsize;
 }
 
Index: uspace/lib/c/include/str.h
===================================================================
--- uspace/lib/c/include/str.h	(revision 9c2c7d2247cc1ad0410cd61ab534af9a246d328b)
+++ uspace/lib/c/include/str.h	(revision 9ef1fadef604b9c3871bb759de90bf613963a180)
@@ -99,4 +99,5 @@
 extern int utf16_to_str(char *dest, size_t size, const uint16_t *src);
 extern int str_to_utf16(uint16_t *dest, size_t dlen, const char *src);
+extern size_t utf16_wsize(const uint16_t *ustr);
 
 extern char *str_chr(const char *str, wchar_t ch);
