Source of: /manual/en/function.iconv-strlen.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.iconv.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'function.iconv-strlen.php',
1 => 'iconv_strlen',
),
'up' =>
array (
0 => 'ref.iconv.php',
1 => 'iconv Functions',
),
'prev' =>
array (
0 => 'function.iconv-set-encoding.php',
1 => 'iconv_set_encoding',
),
'next' =>
array (
0 => 'function.iconv-strpos.php',
1 => 'iconv_strpos',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="function.iconv-strlen" class="refentry">
<div class="refnamediv">
<h1 class="refname">iconv_strlen</h1>
<p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">iconv_strlen</span> — <span class="dc-title">Returns the character count of string</span></p>
</div>
<a name="function.iconv-strlen.description"></a><div class="refsect1 description">
<h3 class="title">Description</h3>
<div class="methodsynopsis dc-description">
<span class="type">int</span> <span class="methodname"><b>iconv_strlen</b></span>
( <span class="methodparam"><span class="type">string</span> <tt class="parameter">$str</tt></span>
[, <span class="methodparam"><span class="type">string</span> <tt class="parameter">$charset</tt><span class="initializer"> = ini_set("iconv.internal_encoding")</span></span>
] )</div>
<p class="para rdfs-comment">
In contrast to <a href="function.strlen.php" class="function">strlen()</a>,
<b>iconv_strlen()</b> counts the occurrences of characters
in the given byte sequence <i><tt class="parameter">str</tt></i>
on the basis of
the specified character set, the result of which is not necessarily
identical to the length of the string in byte.
</p>
</div>
<a name="function.iconv-strlen.parameters"></a><div class="refsect1 parameters">
<h3 class="title">Parameters</h3>
<p class="para">
</p><dl>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">str</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">
The string.
</p>
</dd>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">charset</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">
If <i><tt class="parameter">charset</tt></i>
parameter is omitted,
<i><tt class="parameter">str</tt></i>
is assumed to be encoded in
<a href="iconv.configuration.php" class="link">iconv.internal_encoding</a>.
</p>
</dd>
</dl>
<p>
</p>
</div>
<a name="function.iconv-strlen.returnvalues"></a><div class="refsect1 returnvalues">
<h3 class="title">Return Values</h3>
<p class="para">
Returns the character count of <i><tt class="parameter">str</tt></i>
, as an integer.
</p>
</div>
<a name="function.iconv-strlen.seealso"></a><div class="refsect1 seealso">
<h3 class="title">See Also</h3>
<p class="para">
</p><ul class="simplelist">
<li class="member"><a href="function.strlen.php" class="function" rel="rdfs-seeAlso">strlen()</a> - Get string length</li>
<li class="member"><a href="function.mb-strlen.php" class="function" rel="rdfs-seeAlso">mb_strlen()</a> - Get string length</li>
</ul><p>
</p>
</div>
</div><?php manual_footer(); ?>