<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = 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 => 'ja',
  ),
  'this' => 
  array (
    0 => 'function.iconv-strlen.php',
    1 => 'iconv_strlen',
    2 => '文字列の文字数を返す',
  ),
  'up' => 
  array (
    0 => 'ref.iconv.php',
    1 => 'iconv 関数',
  ),
  'prev' => 
  array (
    0 => 'function.iconv-set-encoding.php',
    1 => 'iconv_set_encoding',
  ),
  'next' => 
  array (
    0 => 'function.iconv-strpos.php',
    1 => 'iconv_strpos',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/iconv/functions/iconv-strlen.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.iconv-strlen" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">iconv_strlen</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">iconv_strlen</span> &mdash; <span class="dc-title">文字列の文字数を返す</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.iconv-strlen-description">
  <h3 class="title">説明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>iconv_strlen</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$string</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$encoding</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   <span class="function"><a href="function.strlen.php" class="function">strlen()</a></span> とは違い、<span class="function"><strong>iconv_strlen()</strong></span>
   は与えられたバイト列 <code class="parameter">string</code> 中に現れる文字の数を
   指定された文字セットに基づいて数えます。この結果は、必ずしも文字列の
   バイト数と一致するとは限りません。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.iconv-strlen-parameters">
  <h3 class="title">パラメータ</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">string</code></dt>
     <dd>
      <p class="para">
       文字列。
      </p>
     </dd>
    
    
     <dt><code class="parameter">encoding</code></dt>
     <dd>
      <p class="para">
       <code class="parameter">encoding</code> パラメータが指定されなかった場合、もしくは <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> の場合、
       <code class="parameter">string</code> のエンコードは
       <a href="iconv.configuration.php" class="link">iconv.internal_encoding</a>
       であると判断されます。
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.iconv-strlen-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="para">
   <code class="parameter">string</code> の文字数を返します。
   処理中にエラーが発生した場合は <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返します。
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.iconv-strlen-changelog">
  <h3 class="title">変更履歴</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>バージョン</th>
      <th>説明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">encoding</code> は、nullable になりました。
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.iconv-strlen-seealso">
  <h3 class="title">参考</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.grapheme-strlen.php" class="function" rel="rdfs-seeAlso">grapheme_strlen()</a> - 書記素単位で文字列の長さを取得する</span></li>
    <li><span class="function"><a href="function.mb-strlen.php" class="function" rel="rdfs-seeAlso">mb_strlen()</a> - 文字列の長さを得る</span></li>
    <li><span class="function"><a href="function.strlen.php" class="function" rel="rdfs-seeAlso">strlen()</a> - 文字列の長さを得る</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>