XINU
Functions
strlen.c File Reference

NULL終端された文字列の長さを返す。NULL終端は長さに含まない。 More...

Go to the source code of this file.

Functions

int strlen (char *str)
 NULL終端された文字列の長さを返す。NULL終端は長さに含まない。 More...
 

Detailed Description

NULL終端された文字列の長さを返す。NULL終端は長さに含まない。

Definition in file strlen.c.

Function Documentation

◆ strlen()

int strlen ( char *  str)

NULL終端された文字列の長さを返す。NULL終端は長さに含まない。

Parameters
[in]str長さを調べる対象の文字列
Returns
文字列の長さを返す。NULL終端は長さに含まない。

Definition at line 11 of file strlen.c.

Referenced by addton(), devisid(), devonid(), dns_bldq(), dns_geta(), getattrid(), if(), newdev(), newtype(), and xsh_ping().

12 {
13  int len;
14 
15  len = 0;
16 
17  while (*str++ != '\0')
18  {
19  len++;
20  }
21  return len;
22 }
Here is the caller graph for this function: