Lazuli
sys
kern
modules
string
string.c
Go to the documentation of this file.
1
/*
2
* SPDX-License-Identifier: GPL-3.0-only
3
* This file is part of Lazuli.
4
*/
5
15
#include <
string.h
>
16
17
#include <
Lazuli/common.h
>
18
19
size_t
20
strlen
(
const
char
*s)
21
{
22
const
char
*
const
original = s;
23
24
if
(
NULL
== original) {
25
return
0;
26
}
27
28
while
(
'\0'
!= *(s++));
29
30
--s;
/* To exclude the count of the final '\0' */
31
32
return
s - original;
33
}
string.h
libc string header.
strlen
size_t strlen(const char *s)
Get the length of the string pointed by s.
Definition:
string.c:20
NULL
#define NULL
NULL pointer.
Definition:
common.h:68
common.h
Basic type definitions and useful macros.
Generated by
1.8.13