<?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.strcspn.php',
    1 => 'strcspn',
    2 => 'Trova la lunghezza del segmento iniziale che non soddisfa una maschera',
  ),
  'up' => 
  array (
    0 => 'ref.strings.php',
    1 => 'String Funzioni',
  ),
  'prev' => 
  array (
    0 => 'function.strcoll.php',
    1 => 'strcoll',
  ),
  'next' => 
  array (
    0 => 'function.strip-tags.php',
    1 => 'strip_tags',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'it',
    'path' => 'reference/strings/functions/strcspn.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.strcspn" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">strcspn</h1>
    <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">strcspn</span> &mdash; <span class="dc-title">
     Trova la lunghezza del segmento iniziale che non soddisfa una maschera
    </span></p>

   </div>
   <div class="refsect1 unknown-1387" id="refsect1-function.strcspn-unknown-1387">
    <h3 class="title">Descrizione</h3>
     <div class="methodsynopsis dc-description">
      <span class="methodname"><strong>strcspn</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$str1</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$str2</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">$inizio</code><span class="initializer"> = ?</span></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">$lunghezza</code><span class="initializer"> = ?</span></span><br>): <span class="type"><a href="language.types.integer.php" class="type int">int</a></span></div>

    <p class="simpara">
     Restituisce la lunghezza del segmento iniziale di
     <code class="parameter">str1</code> che <em>non</em>
     contiene nessuno dei caratteri specificati in <code class="parameter">str2</code>.
    </p>
    <p class="simpara">
     Dal PHP 4.3.0, <span class="function"><strong>strcspn()</strong></span> accetta due parametri
     <span class="type">interi</span>, opzionali, che possono essere utilizzati per definire la posizione di
     <code class="parameter">inizio</code> e la 
     <code class="parameter">lunghezza</code> della stringa da esaminare.
    </p>

    <blockquote class="note"><p><strong class="note">Nota</strong>: <span class="simpara">Questa funzione è
 binary-safe (gestisce correttamente i file binari)</span></p></blockquote>

    <p class="simpara">
     Vedere anche <span class="function"><a href="function.strspn.php" class="function">strspn()</a></span>.
    </p>
   </div>

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