<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.intlchar.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'intlchar.enumcharnames.php',
    1 => 'IntlChar::enumCharNames',
    2 => '指定された範囲の全てのUnicode文字を走査する',
  ),
  'up' => 
  array (
    0 => 'class.intlchar.php',
    1 => 'IntlChar',
  ),
  'prev' => 
  array (
    0 => 'intlchar.digit.php',
    1 => 'IntlChar::digit',
  ),
  'next' => 
  array (
    0 => 'intlchar.enumchartypes.php',
    1 => 'IntlChar::enumCharTypes',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/intl/intlchar/enumcharnames.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="intlchar.enumcharnames" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">IntlChar::enumCharNames</h1>
  <p class="verinfo">(PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">IntlChar::enumCharNames</span> &mdash; <span class="dc-title">指定された範囲の全てのUnicode文字を走査する</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-intlchar.enumcharnames-description">
  <h3 class="title">説明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="modifier">static</span> <span class="methodname"><strong>IntlChar::enumCharNames</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><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.string.php" class="type string">string</a></span></span> <code class="parameter">$start</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><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.string.php" class="type string">string</a></span></span> <code class="parameter">$end</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.callable.php" class="type callable">callable</a></span> <code class="parameter">$callback</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$type</code><span class="initializer"> = <strong><code><a href="class.intlchar.php#intlchar.constants.unicode-char-name">IntlChar::UNICODE_CHAR_NAME</a></code></strong></span></span><br>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   最初と最後(但し、最初は含み、最後は含まない)
   の範囲にある Unicode 文字を全て走査し、
   個々の文字について、コードポイントの値と文字の名前を渡してコールバック関数をコールします。
  </p>
  <p class="para">
   Unicode 1.0 の名前については、modern name と異なるもののみが走査されます。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-intlchar.enumcharnames-parameters">
  <h3 class="title">パラメータ</h3>
  <dl>
   
    <dt><code class="parameter">start</code></dt>
    <dd>
     <p class="para">
      走査を開始する最初のコードポイント。
     </p>
    </dd>
   
   
    <dt><code class="parameter">end</code></dt>
    <dd>
     <p class="para">
      走査する最後のコードポイントよりひとつ先を指定します。
     </p>
    </dd>
   
   
    <dt><code class="parameter">callback</code></dt>
    <dd>
     <p class="para">
      文字の名前それぞれについて、この関数がコールされます。
      以下の3つの引数が渡されます:
      <ul class="simplelist">
       <li><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="literal">$codepoint</code> - コードポイントの数値</li>
       <li><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="literal">$nameChoice</code> - 以下に示す <code class="parameter">type</code> と同じ値</li>
       <li><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="literal">$name</code> - 文字の名前</li>
      </ul>
     </p>
    </dd>
   
   
    <dt><code class="parameter">type</code></dt>
    <dd>
     <p class="para">
      どの種類の名前を走査するかを選びます。以下の定数が使えます:
      <ul class="simplelist">
       <li><strong><code><a href="class.intlchar.php#intlchar.constants.unicode-char-name">IntlChar::UNICODE_CHAR_NAME</a></code></strong> (デフォルト)</li>
       <li><strong><code><a href="class.intlchar.php#intlchar.constants.unicode-10-char-name">IntlChar::UNICODE_10_CHAR_NAME</a></code></strong></li>
       <li><strong><code><a href="class.intlchar.php#intlchar.constants.extended-char-name">IntlChar::EXTENDED_CHAR_NAME</a></code></strong></li>
       <li><strong><code><a href="class.intlchar.php#intlchar.constants.char-name-alias">IntlChar::CHAR_NAME_ALIAS</a></code></strong></li>
       <li><strong><code><a href="class.intlchar.php#intlchar.constants.char-name-choice-count">IntlChar::CHAR_NAME_CHOICE_COUNT</a></code></strong></li>
      </ul>
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-intlchar.enumcharnames-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="para">
   成功した場合に <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> を、失敗した場合に <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返します。
  </p>
 </div>


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

     </thead>

     <tbody class="tbody">
      <tr>
       <td>8.3.0</td>
       <td>
        この関数は、失敗時に <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返すようになりました。
        これより前のバージョンでは <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> を返していました。
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-intlchar.enumcharnames-examples">
  <h3 class="title">例</h3>
  <div class="example" id="example-1">
   <p><strong>例1 サンプルの範囲に入るコードポイントを走査する例</strong></p>
   <div class="example-contents">
    <div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />IntlChar</span><span style="color: #007700">::</span><span style="color: #0000BB">enumCharNames</span><span style="color: #007700">(</span><span style="color: #0000BB">0x2600</span><span style="color: #007700">, </span><span style="color: #0000BB">0x2610</span><span style="color: #007700">, function(</span><span style="color: #0000BB">$codepoint</span><span style="color: #007700">, </span><span style="color: #0000BB">$nameChoice</span><span style="color: #007700">, </span><span style="color: #0000BB">$name</span><span style="color: #007700">) {<br />    </span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"U+%04x %s\n"</span><span style="color: #007700">, </span><span style="color: #0000BB">$codepoint</span><span style="color: #007700">, </span><span style="color: #0000BB">$name</span><span style="color: #007700">);<br />});<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>上の例の出力は以下となります。</p></div>
   <div class="example-contents screen">
    <div class="examplescode"><pre class="examplescode">U+2600 BLACK SUN WITH RAYS
U+2601 CLOUD
U+2602 UMBRELLA
U+2603 SNOWMAN
U+2604 COMET
U+2605 BLACK STAR
U+2606 WHITE STAR
U+2607 LIGHTNING
U+2608 THUNDERSTORM
U+2609 SUN
U+260a ASCENDING NODE
U+260b DESCENDING NODE
U+260c CONJUNCTION
U+260d OPPOSITION
U+260e BLACK TELEPHONE
U+260f WHITE TELEPHONE</pre>
</div>
   </div>
  </div>
 </div>


 <div class="refsect1 seealso" id="refsect1-intlchar.enumcharnames-seealso">
  <h3 class="title">参考</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="intlchar.charname.php" class="function" rel="rdfs-seeAlso">IntlChar::charName()</a> - Unicode 文字の名前を取得する</span></li>
    <li><span class="function"><a href="intlchar.charfromname.php" class="function" rel="rdfs-seeAlso">IntlChar::charFromName()</a> - 名前で Unicode 文字を探し、コードポイントの値を返す</span></li>
   </ul>
  </p>
 </div>


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