Staging
v0.8.1
https://github.com/torvalds/linux
Raw File
Tip revision: 15ade5d2e7775667cf191cf2f94327a4889f8b9d authored by Linus Torvalds on 08 April 2019, 00:09:59 UTC
Linux 5.1-rc4
Tip revision: 15ade5d
string.c
// SPDX-License-Identifier: GPL-2.0
/*
 * Copied from linux/lib/string.c
 *
 *  Copyright (C) 1991, 1992  Linus Torvalds
 */

#include <stddef.h>

/**
 * strlen - Find the length of a string
 * @s: The string to be sized
 */
size_t test_strlen(const char *s)
{
	const char *sc;

	for (sc = s; *sc != '\0'; ++sc)
		/* nothing */;
	return sc - s;
}
back to top