brintos

brintos / linux-shallow public Read only

0
0
Text · 347 B · 45e7775 Raw
22 lines · c
1// SPDX-License-Identifier: GPL-2.02/*3 * Copied from linux/lib/string.c4 *5 *  Copyright (C) 1991, 1992  Linus Torvalds6 */7 8#include <stddef.h>9 10/**11 * strlen - Find the length of a string12 * @s: The string to be sized13 */14size_t test_strlen(const char *s)15{16	const char *sc;17 18	for (sc = s; *sc != '\0'; ++sc)19		/* nothing */;20	return sc - s;21}22