<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.ps.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.ps-hyphenate.php',
    1 => 'ps_hyphenate',
    2 => 'Relie un mot',
  ),
  'up' => 
  array (
    0 => 'ref.ps.php',
    1 => 'Fonctions PS',
  ),
  'prev' => 
  array (
    0 => 'function.ps-get-value.php',
    1 => 'ps_get_value',
  ),
  'next' => 
  array (
    0 => 'function.ps-include-file.php',
    1 => 'ps_include_file',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/ps/functions/ps-hyphenate.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.ps-hyphenate" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ps_hyphenate</h1>
  <p class="verinfo">(PECL ps &gt;= 1.1.1)</p><p class="refpurpose"><span class="refname">ps_hyphenate</span> &mdash; <span class="dc-title">Relie un mot</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.ps-hyphenate-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ps_hyphenate</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$psdoc</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$text</code></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="para rdfs-comment">
   Effectue la césure du mot passé. <span class="function"><strong>ps_hyphenate()</strong></span> évalue la valeur
   hyphenminchars (fixé par <span class="function"><a href="function.ps-set-value.php" class="function">ps_set_value()</a></span>) et le paramètre
   hyphendic (fixé par <span class="function"><a href="function.ps-set-parameter.php" class="function">ps_set_parameter()</a></span>). hyphendict doit
   être fixé avant d&#039;appeler cette fonction.
  </p>
  <p class="para">
   Cette fonction requiert que la configuration locale <strong><code><a href="string.constants.php#constant.lc-ctype">LC_CTYPE</a></code></strong> soit
   correctement faite. Cela est fait lorsque l&#039;extension est initialisée en
   utilisant les variables d&#039;environnement. Sur les systèmes Unix, lisez les
   pages de manuel de locale pour plus d&#039;informations.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ps-hyphenate-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">psdoc</code></dt>
     <dd>
      <p class="para">
       Identifiant d&#039;un fichier postscript retourné par
       <span class="function"><a href="function.ps-new.php" class="function">ps_new()</a></span>.
      </p>
     </dd>
    
    
     <dt><code class="parameter">text</code></dt>
     <dd>
      <p class="para">
       <code class="parameter">text</code> ne devrait pas contenir de caractères non
       alpha. Les positions possibles pour les coupures sont retournées dans un
       tableau de nombre entier. Chaque nombre est la position du caractère
       dans <code class="parameter">text</code> après lequel une césure peut avoir lieu.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ps-hyphenate-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Un tableau d&#039;entiers indiquant la position des coupures possibles dans le
   texte  ou <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> si une erreur survient.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.ps-hyphenate-examples">
  <h3 class="title">Exemples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Exemple #1 Coupe un texte</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$word </span><span style="color: #007700">= </span><span style="color: #DD0000">"Koordinatensystem"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">$psdoc </span><span style="color: #007700">= </span><span style="color: #0000BB">ps_new</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">ps_set_parameter</span><span style="color: #007700">(</span><span style="color: #0000BB">$psdoc</span><span style="color: #007700">, </span><span style="color: #DD0000">"hyphendict"</span><span style="color: #007700">, </span><span style="color: #DD0000">"hyph_de.dic"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$hyphens </span><span style="color: #007700">= </span><span style="color: #0000BB">ps_hyphenate</span><span style="color: #007700">(</span><span style="color: #0000BB">$psdoc</span><span style="color: #007700">, </span><span style="color: #0000BB">$word</span><span style="color: #007700">);<br />for(</span><span style="color: #0000BB">$i</span><span style="color: #007700">=</span><span style="color: #0000BB">0</span><span style="color: #007700">; </span><span style="color: #0000BB">$i</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">strlen</span><span style="color: #007700">(</span><span style="color: #0000BB">$word</span><span style="color: #007700">); </span><span style="color: #0000BB">$i</span><span style="color: #007700">++) {<br />  echo </span><span style="color: #0000BB">$word</span><span style="color: #007700">[</span><span style="color: #0000BB">$i</span><span style="color: #007700">];<br />  if(</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">$i</span><span style="color: #007700">, </span><span style="color: #0000BB">$hyphens</span><span style="color: #007700">))<br />    echo </span><span style="color: #DD0000">"-"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #0000BB">ps_delete</span><span style="color: #007700">(</span><span style="color: #0000BB">$psdoc</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>L&#039;exemple ci-dessus va afficher :</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Ko-ordi-na-ten-sys-tem</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.ps-hyphenate-seealso">
  <h3 class="title">Voir aussi</h3>
  <p class="para">
   <ul class="simplelist">
    
    <li><span class="function"><a href="function.ps-show-boxed.php" class="function" rel="rdfs-seeAlso">ps_show_boxed()</a> - &Eacute;criture de texte dans une bo&icirc;te</span></li>
    <li>locale(1)</li>
   </ul>
  </p>
 </div>

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