blob: 4c482e25079f8ff110f68368b4a215c9699fdca0 [file]
<html lang="en">
<head>
<title>strlen - Untitled</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Untitled">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Strings.html#Strings" title="Strings">
<link rel="prev" href="strerror_005fr.html#strerror_005fr" title="strerror_r">
<link rel="next" href="strlwr.html#strlwr" title="strlwr">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="strlen"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="strlwr.html#strlwr">strlwr</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="strerror_005fr.html#strerror_005fr">strerror_r</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Strings.html#Strings">Strings</a>
<hr>
</div>
<h3 class="section">5.26 <code>strlen</code>&mdash;character string length</h3>
<p><a name="index-strlen-394"></a><strong>Synopsis</strong>
<pre class="example"> #include &lt;string.h&gt;
size_t strlen(const char *<var>str</var>);
</pre>
<p><strong>Description</strong><br>
The <code>strlen</code> function works out the length of the string
starting at <code>*</code><var>str</var> by counting chararacters until it
reaches a <code>NULL</code> character.
<p><br>
<strong>Returns</strong><br>
<code>strlen</code> returns the character count.
<p><br>
<strong>Portability</strong><br>
<code>strlen</code> is ANSI C.
<p><code>strlen</code> requires no supporting OS subroutines.
<p><br>
</body></html>