xref: /rk3399_ARM-atf/lib/libc/strlen.c (revision 03e8e222f68c6651f51a8fccb5c26cdf6bdc83bd)
1 /*
2  * Copyright (c) 2018-2025, Arm Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #include <string_private.h>
8 
9 size_t strlen(const char *s)
10 {
11 	const char *cursor = s;
12 
13 	while (*cursor)
14 		cursor++;
15 
16 	return cursor - s;
17 }
18