1
0
mirror of https://github.com/php/doc-it.git synced 2026-03-24 23:52:12 +01:00
Files
Richard Quadling 2769b12f1b Reencode XML to UTF-8
git-svn-id: https://svn.php.net/repository/phpdoc/it/trunk@314558 c90b9560-bf6c-de11-be94-00142212c4b1
2011-08-08 16:37:53 +00:00

88 lines
2.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!-- EN-Revision: n/a Maintainer: darvina Status: ready -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry xml:id="function.strstr" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>strstr</refname>
<refpurpose>Trova la prima occorrenza di una stringa</refpurpose>
</refnamediv>
<refsect1>
<title>Descrizione</title>
<methodsynopsis>
<type>string</type><methodname>strstr</methodname>
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
<methodparam><type>string</type><parameter>needle</parameter></methodparam>
</methodsynopsis>
<para>
Restituisce la parte della stringa <parameter>haystack</parameter> dalla prima occorrenza
di <parameter>needle</parameter> fino alla fine di
<parameter>haystack</parameter>.
</para>
<para>
Se non si trova <parameter>needle</parameter>, restituisce &false;.
</para>
<para>
Se <parameter>needle</parameter> non è una stringa, il parametro viene convertito in
un intero e utilizzato come valore ordinale di un carattere.
</para>
<note>
<para>
Questa funzione distingue tra maiuscole e minuscole. Per una versione che non abbia
questa distinzione guardare <function>stristr</function>.
</para>
</note>
<para>
<example>
<title>Esempio di uso di <function>strstr</function></title>
<programlisting role="php">
<![CDATA[
<?php
$email = 'user@example.com';
$domain = strstr($email, '@');
echo $domain; // prints @example.com
?>
]]>
</programlisting>
</example>
</para>
<para>
<note>
<para>
Se si desidera soltanto determinare se una particolare stringa è presente in
<parameter>haystack</parameter>, utilizzare la più veloce e meno costosa in
termini di memoria <function>strpos</function>.
</para>
</note>
</para>
<para>
<function>strstr</function> è sicura con i dati binari dal PHP 4.3.0
</para>
<para>
Vedere anche: <function>ereg</function>, <function>preg_match</function>,
<function>stristr</function>, <function>strpos</function>,
<function>strrchr</function> e <function>substr</function>.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->