Newer
Older
arm-trusted-firmware / lib / libc / strlen.c
@Antonio Nino Diaz Antonio Nino Diaz on 22 Aug 2018 256 bytes libc: Introduce cdefs.h, assert.h and strlen.c
/*
 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include <string.h>

size_t strlen(const char *s)
{
	const char *cursor = s;

	while (*cursor)
		cursor++;

	return cursor - s;
}