<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.intl.grapheme.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'function.grapheme-str-split.php',
    1 => 'grapheme_str_split',
    2 => '書記素クラスターを受け取り、文字の配列を返す',
  ),
  'up' => 
  array (
    0 => 'ref.intl.grapheme.php',
    1 => 'Grapheme 関数',
  ),
  'prev' => 
  array (
    0 => 'function.grapheme-extract.php',
    1 => 'grapheme_extract',
  ),
  'next' => 
  array (
    0 => 'function.grapheme-stripos.php',
    1 => 'grapheme_stripos',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/intl/grapheme/grapheme-str-split.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.grapheme-str-split" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">grapheme_str_split</h1>
  <p class="verinfo">(PHP 8 &gt;= 8.4.0)</p><p class="refpurpose"><span class="refname">grapheme_str_split</span> &mdash; <span class="dc-title">書記素クラスターを受け取り、文字の配列を返す</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.grapheme-str-split-description">
  <h3 class="title">説明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>grapheme_str_split</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"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$length</code><span class="initializer"> = 1</span></span>): <span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="simpara">
   この関数は文字の配列を返します。
   これは <span class="function"><a href="function.str-split.php" class="function">str_split()</a></span>
   に書記素クラスターのサポートを追加したものです。
   <code class="parameter">length</code> を指定すると、文字列は指定された数の
   書記素クラスターに分割されます。
  </p>
  </div>


 <div class="refsect1 parameters" id="refsect1-function.grapheme-str-split-parameters">
  <h3 class="title">パラメータ</h3>
  <dl>
   
    <dt><code class="parameter">string</code></dt>
    <dd>
     <p class="para">
      書記素クラスターまたはチャンクに分割する<span class="type"><a href="language.types.string.php" class="type string">string</a></span>。
      <code class="parameter">string</code> はUTF-8でなければなりません。
     </p>
    </dd>
   
   
    <dt><code class="parameter">length</code></dt>
    <dd>
     <p class="para">
      配列の各要素が <code class="parameter">length</code> 書記素クラスターで構成されます。
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.grapheme-str-split-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="simpara">
   <span class="function"><strong>grapheme_str_split()</strong></span> は文字列の配列を返します。 失敗した場合に <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返します。
  </p>
 </div>


 <div class="refsect1 errors" id="refsect1-function.grapheme-str-split-errors">
  <h3 class="title">エラー / 例外</h3>
  <p class="simpara">
   <code class="parameter">length</code> が <code class="literal">1</code> 未満のとき、
   <span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> がスローされます。
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.grapheme-str-split-seealso">
  <h3 class="title">参考</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.str-split.php" class="function" rel="rdfs-seeAlso">str_split()</a> - 文字列を配列に変換する</span></li>
   <li><span class="function"><a href="function.mb-str-split.php" class="function" rel="rdfs-seeAlso">mb_str_split()</a> - マルチバイト文字列を受取り、文字の配列を返す</span></li>
   <li>
    <a href="http://unicode.org/reports/tr29/#Grapheme_Cluster_Boundaries" class="link external">&raquo;&nbsp;
     Unicode Text Segmentation: Grapheme Cluster Boundaries
    </a>
   </li>
  </ul>
 </div>

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