<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.strings.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'function.strncmp.php',
    1 => 'strncmp',
    2 => 'Confronto tra stringhe sui primi n caratteri, sicuro con i dati binari',
  ),
  'up' => 
  array (
    0 => 'ref.strings.php',
    1 => 'String Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.strncasecmp.php',
    1 => 'strncasecmp',
  ),
  'next' => 
  array (
    0 => 'function.strpbrk.php',
    1 => 'strpbrk',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'it',
    'path' => 'reference/strings/functions/strncmp.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.strncmp" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">strncmp</h1>
    <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">strncmp</span> &mdash; <span class="dc-title">
     Confronto tra stringhe sui primi n caratteri, sicuro con i dati binari
    </span></p>

   </div>
   <div class="refsect1 unknown-1414" id="refsect1-function.strncmp-unknown-1414">
    <h3 class="title">Descrizione</h3>
     <div class="methodsynopsis dc-description">
      <span class="methodname"><strong>strncmp</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$str1</code></span>, <span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$str2</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$len</code></span>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

    <p class="para rdfs-comment">
     Questa funzione è simile a <span class="function"><a href="function.strcmp.php" class="function">strcmp()</a></span>, con la
     differenza che si può specificare il limite superiore del numero
     di caratteri  (<code class="parameter">len</code>) per ciascuna stringa, da utilizzare
     per il confronto.
    </p>
    <p class="simpara">
     Restituisce &lt; 0 se <code class="parameter">str1</code> è minore di
     <code class="parameter">str2</code>; &gt; 0 se <code class="parameter">str1</code>
     è maggiore di <code class="parameter">str2</code>, e 0 se sono
     uguali.
    </p>
    <p class="simpara">
     Nota: questo confronto distingue tra lettere minuscole e maiuscole.
    </p>
    <p class="simpara">
     Vedere anche <span class="function"><strong>ereg()</strong></span>,
     <span class="function"><a href="function.strncasecmp.php" class="function">strncasecmp()</a></span>,
     <span class="function"><a href="function.strcasecmp.php" class="function">strcasecmp()</a></span>, <span class="function"><a href="function.substr.php" class="function">substr()</a></span>,
     <span class="function"><a href="function.stristr.php" class="function">stristr()</a></span>, <span class="function"><a href="function.strcmp.php" class="function">strcmp()</a></span> e
     <span class="function"><a href="function.strstr.php" class="function">strstr()</a></span>.
    </p>
   </div>

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