1*f0abbfd8SChristophe Leroy // SPDX-License-Identifier: GPL-2.0
2*f0abbfd8SChristophe Leroy /*
3*f0abbfd8SChristophe Leroy  * Copied from linux/lib/string.c
4*f0abbfd8SChristophe Leroy  *
5*f0abbfd8SChristophe Leroy  *  Copyright (C) 1991, 1992  Linus Torvalds
6*f0abbfd8SChristophe Leroy  */
7*f0abbfd8SChristophe Leroy 
8*f0abbfd8SChristophe Leroy #include <stddef.h>
9*f0abbfd8SChristophe Leroy 
10*f0abbfd8SChristophe Leroy /**
11*f0abbfd8SChristophe Leroy  * strlen - Find the length of a string
12*f0abbfd8SChristophe Leroy  * @s: The string to be sized
13*f0abbfd8SChristophe Leroy  */
test_strlen(const char * s)14*f0abbfd8SChristophe Leroy size_t test_strlen(const char *s)
15*f0abbfd8SChristophe Leroy {
16*f0abbfd8SChristophe Leroy 	const char *sc;
17*f0abbfd8SChristophe Leroy 
18*f0abbfd8SChristophe Leroy 	for (sc = s; *sc != '\0'; ++sc)
19*f0abbfd8SChristophe Leroy 		/* nothing */;
20*f0abbfd8SChristophe Leroy 	return sc - s;
21*f0abbfd8SChristophe Leroy }
22