Index: uspace/lib/c/generic/str.c
===================================================================
--- uspace/lib/c/generic/str.c	(revision affaf2e32d63acee2b44deef78a9bc2876c0cde3)
+++ uspace/lib/c/generic/str.c	(revision be2a38ad69d4e9a07b4e8871b3c9fcce28423470)
@@ -397,4 +397,31 @@
 	
 	return len;
+}
+
+/** Get character display width on a character cell display.
+ *
+ * @param ch	Character
+ * @return	Width of character in cells.
+ */
+size_t chr_width(wchar_t ch)
+{
+	return 1;
+}
+
+/** Get string display width on a character cell display.
+ *
+ * @param str	String
+ * @return	Width of string in cells.
+ */
+size_t str_width(const char *str)
+{
+	size_t width = 0;
+	size_t offset = 0;
+	wchar_t ch;
+	
+	while ((ch = str_decode(str, &offset, STR_NO_LIMIT)) != 0)
+		width += chr_width(ch);
+	
+	return width;
 }
 
Index: uspace/lib/c/include/str.h
===================================================================
--- uspace/lib/c/include/str.h	(revision affaf2e32d63acee2b44deef78a9bc2876c0cde3)
+++ uspace/lib/c/include/str.h	(revision be2a38ad69d4e9a07b4e8871b3c9fcce28423470)
@@ -73,4 +73,7 @@
 extern size_t wstr_nlength(const wchar_t *str, size_t size);
 
+extern size_t chr_width(wchar_t ch);
+extern size_t str_width(const char *str);
+
 extern bool ascii_check(wchar_t ch);
 extern bool chr_check(wchar_t ch);
