Index: kernel/genarch/src/multiboot/multiboot.c
===================================================================
--- kernel/genarch/src/multiboot/multiboot.c	(revision 1b0b48e09eab2e821aca4d6f6b078ce38136134f)
+++ kernel/genarch/src/multiboot/multiboot.c	(revision 06b785f8cd841eaeec20587b753477850c12723b)
@@ -55,5 +55,5 @@
 	end = strchr(cmd_line, ' ');
 	if (end == NULL)
-		end = cmd_line + strlen(cmd_line);
+		end = cmd_line + str_size(cmd_line);
 	
 	/*
Index: kernel/genarch/src/ofw/ofw_tree.c
===================================================================
--- kernel/genarch/src/ofw/ofw_tree.c	(revision 1b0b48e09eab2e821aca4d6f6b078ce38136134f)
+++ kernel/genarch/src/ofw/ofw_tree.c	(revision 06b785f8cd841eaeec20587b753477850c12723b)
@@ -253,6 +253,6 @@
 		return NULL;
 	
-	for (i = 1; i < strlen(path) && node; i = j + 1) {
-		for (j = i; j < strlen(path) && path[j] != '/'; j++)
+	for (i = 1; i < str_size(path) && node; i = j + 1) {
+		for (j = i; j < str_size(path) && path[j] != '/'; j++)
 			;
 		if (i == j)	/* skip extra slashes */
Index: kernel/generic/include/string.h
===================================================================
--- kernel/generic/include/string.h	(revision 1b0b48e09eab2e821aca4d6f6b078ce38136134f)
+++ kernel/generic/include/string.h	(revision 06b785f8cd841eaeec20587b753477850c12723b)
@@ -44,11 +44,12 @@
 extern wchar_t chr_decode(const char *, size_t *, size_t);
 extern bool chr_encode(const wchar_t, char *, size_t *, size_t);
+
+extern size_t str_size(const char *str);
 extern size_t str_lsize(const char *, count_t);
+extern count_t str_length(const char *str);
+extern count_t wstr_length(const wchar_t *str);
+
 extern bool ascii_check(const wchar_t ch);
 extern bool unicode_check(const wchar_t ch);
-
-extern size_t strlen(const char *str);
-extern count_t str_length(const char *str);
-extern count_t wstr_length(const wchar_t *str);
 
 extern int strcmp(const char *src, const char *dst);
Index: kernel/generic/src/console/cmd.c
===================================================================
--- kernel/generic/src/console/cmd.c	(revision 1b0b48e09eab2e821aca4d6f6b078ce38136134f)
+++ kernel/generic/src/console/cmd.c	(revision 06b785f8cd841eaeec20587b753477850c12723b)
@@ -520,6 +520,6 @@
 		
 		spinlock_lock(&hlp->lock);
-		if (strlen(hlp->name) > len)
-			len = strlen(hlp->name);
+		if (str_size(hlp->name) > len)
+			len = str_size(hlp->name);
 		spinlock_unlock(&hlp->lock);
 	}
@@ -592,5 +592,5 @@
 		spinlock_lock(&hlp->lock);
 
-		if (strncmp(hlp->name, (const char *) argv->buffer, strlen(hlp->name)) == 0) {
+		if (strncmp(hlp->name, (const char *) argv->buffer, str_size(hlp->name)) == 0) {
 			printf("%s - %s\n", hlp->name, hlp->description);
 			if (hlp->help)
@@ -973,6 +973,6 @@
 	test_t *test;
 	for (test = tests; test->name != NULL; test++) {
-		if (strlen(test->name) > len)
-			len = strlen(test->name);
+		if (str_size(test->name) > len)
+			len = str_size(test->name);
 	}
 	
Index: kernel/generic/src/console/kconsole.c
===================================================================
--- kernel/generic/src/console/kconsole.c	(revision 1b0b48e09eab2e821aca4d6f6b078ce38136134f)
+++ kernel/generic/src/console/kconsole.c	(revision 06b785f8cd841eaeec20587b753477850c12723b)
@@ -138,6 +138,6 @@
 			spinlock_lock(&hlp->lock);
 		}
-		if ((strncmp(hlp->name, cmd->name, max(strlen(cmd->name),
-		    strlen(hlp->name))) == 0)) {
+		if ((strncmp(hlp->name, cmd->name, max(str_size(cmd->name),
+		    str_size(hlp->name))) == 0)) {
 			/* The command is already there. */
 			spinlock_unlock(&hlp->lock);
@@ -173,5 +173,5 @@
 	int i;
 	
-	for (i = strlen(str); i > pos; i--)
+	for (i = str_size(str); i > pos; i--)
 		str[i] = str[i - 1];
 	str[pos] = ch;
@@ -181,5 +181,5 @@
 static const char *cmdtab_search_one(const char *name,link_t **startpos)
 {
-	size_t namelen = strlen(name);
+	size_t namelen = str_size(name);
 	const char *curname;
 
@@ -194,5 +194,5 @@
 
 		curname = hlp->name;
-		if (strlen(curname) < namelen)
+		if (str_size(curname) < namelen)
 			continue;
 		if (strncmp(curname, name, namelen) == 0) {
@@ -223,5 +223,5 @@
 		startpos = startpos->next;
 		if (!found)
-			strncpy(output, foundtxt, strlen(foundtxt) + 1);
+			strncpy(output, foundtxt, str_size(foundtxt) + 1);
 		else {
 			for (i = 0; output[i] && foundtxt[i] &&
@@ -235,5 +235,5 @@
 		return 0;
 
-	if (found > 1 && !strlen(output)) {
+	if (found > 1 && !str_size(output)) {
 		printf("\n");
 		startpos = NULL;
@@ -310,8 +310,8 @@
 				insert_char(current, tmp[i], i + position);
 
-			if (strlen(tmp) || found == 1) { /* If we have a hint */
+			if (str_size(tmp) || found == 1) { /* If we have a hint */
 				for (i = position; i < curlen; i++) 
 					putchar(current[i]);
-				position += strlen(tmp);
+				position += str_size(tmp);
 				/* Add space to end */
 				if (found == 1 && position == curlen &&
@@ -326,5 +326,5 @@
 				for (i = 0; i < curlen; i++)
 					putchar(current[i]);
-				position += strlen(tmp);
+				position += str_size(tmp);
 			}
 			rdln_print_c('\b', curlen - position);
@@ -385,5 +385,5 @@
 				current = history[histposition];
 				printf("%s", current);
-				curlen = strlen(current);
+				curlen = str_size(current);
 				position = curlen;
 				continue;
@@ -444,5 +444,5 @@
 	while (true) {
 		cmdline = clever_readline((char *) prompt, stdin);
-		len = strlen(cmdline);
+		len = str_size(cmdline);
 		if (!len)
 			continue;
@@ -545,5 +545,5 @@
 		spinlock_lock(&hlp->lock);
 		
-		if (strncmp(hlp->name, &cmdline[start], max(strlen(hlp->name),
+		if (strncmp(hlp->name, &cmdline[start], max(str_size(hlp->name),
 		    end - start + 1)) == 0) {
 			cmd = hlp;
Index: kernel/generic/src/debug/symtab.c
===================================================================
--- kernel/generic/src/debug/symtab.c	(revision 1b0b48e09eab2e821aca4d6f6b078ce38136134f)
+++ kernel/generic/src/debug/symtab.c	(revision 06b785f8cd841eaeec20587b753477850c12723b)
@@ -107,5 +107,5 @@
 static char * symtab_search_one(const char *name, int *startpos)
 {
-	unsigned int namelen = strlen(name);
+	unsigned int namelen = str_size(name);
 	char *curname;
 	int i, j;
@@ -127,5 +127,5 @@
 		j -= colonoffset;
 		curname += j;
-		if (strlen(curname) < namelen)
+		if (str_size(curname) < namelen)
 			continue;
 		if (strncmp(curname, name, namelen) == 0) {
@@ -158,5 +158,5 @@
 	i = 0;
 	while ((hint = symtab_search_one(name, &i))) {
-		if (!strlen(hint)) {
+		if (!str_size(hint)) {
 			*addr =  uint64_t_le2host(symbol_table[i].address_le);
 			found++;
@@ -215,5 +215,5 @@
 
 	/* Do not print everything */
-	if (!strlen(name))
+	if (!str_size(name))
 		return 0;
 	
@@ -224,5 +224,5 @@
 		startpos++;
 		if (!found)
-			strncpy(output, foundtxt, strlen(foundtxt) + 1);
+			strncpy(output, foundtxt, str_size(foundtxt) + 1);
 		else {
 			for (i = 0; output[i] && foundtxt[i] &&
@@ -236,5 +236,5 @@
 		return 0;
 
-	if (found > 1 && !strlen(output)) {
+	if (found > 1 && !str_size(output)) {
 		printf("\n");
 		startpos = 0;
Index: kernel/generic/src/lib/string.c
===================================================================
--- kernel/generic/src/lib/string.c	(revision 1b0b48e09eab2e821aca4d6f6b078ce38136134f)
+++ kernel/generic/src/lib/string.c	(revision 06b785f8cd841eaeec20587b753477850c12723b)
@@ -70,5 +70,4 @@
  *
  * @return	Value of decoded character or '?' on decoding error.
- *
  */
 wchar_t chr_decode(const char *str, size_t *offset, size_t sz)
@@ -247,5 +246,4 @@
  *
  * @return True if character is valid Unicode code point.
- *
  */
 bool unicode_check(const wchar_t ch)
@@ -257,16 +255,17 @@
 }
 
-/** Return number of plain characters in a string.
- *
- * @param str NULL-terminated string.
- *
- * @return Number of characters in @a str.
- *
- */
-size_t strlen(const char *str)
+/** Return number of bytes the string occupies.
+ *
+ * @param str A string.
+ * @return Number of bytes in @a str excluding the null terminator.
+ */
+size_t str_size(const char *str)
 {
 	size_t size;
-	for (size = 0; str[size]; size++);
-	
+
+	size = 0;
+	while (*str++ != '\0')
+		++size;
+
 	return size;
 }
@@ -347,5 +346,4 @@
  *
  * @return 0 if the strings are equal, -1 if first is smaller, 1 if second smaller.
- *
  */
 int strncmp(const char *src, const char *dst, size_t len)
@@ -381,5 +379,4 @@
  * @param dest Destination buffer.
  * @param len  Size of destination buffer.
- *
  */
 void strncpy(char *dest, const char *src, size_t len)
Index: kernel/generic/src/printf/printf_core.c
===================================================================
--- kernel/generic/src/printf/printf_core.c	(revision 1b0b48e09eab2e821aca4d6f6b078ce38136134f)
+++ kernel/generic/src/printf/printf_core.c	(revision 06b785f8cd841eaeec20587b753477850c12723b)
@@ -126,7 +126,7 @@
 {
 	if (str == NULL)
-		return printf_putnchars_utf8(nullstr, strlen(nullstr), ps);
-	
-	return ps->write_utf8((void *) str, strlen(str), ps->data);
+		return printf_putnchars_utf8(nullstr, str_size(nullstr), ps);
+	
+	return ps->write_utf8((void *) str, str_size(str), ps->data);
 }
 
