-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathstristr.xml
107 lines (104 loc) · 2.87 KB
/
stristr.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<?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.8 -->
<refentry xml:id="function.stristr" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>stristr</refname>
<refpurpose>
Versione insensibile alle maiuscole/minuscole di <function>strstr</function>
</refpurpose>
</refnamediv>
<refsect1>
<title>Descrizione</title>
<methodsynopsis>
<type>string</type><methodname>stristr</methodname>
<methodparam><type>string</type><parameter>haystack</parameter></methodparam>
<methodparam><type>string</type><parameter>needle</parameter></methodparam>
</methodsynopsis>
<para>
Restituisce il contenuto di <parameter>haystack</parameter> dalla prima occorrenza
di <parameter>needle</parameter> fino alla fine.
<parameter>needle</parameter> e <parameter>haystack</parameter>
sono esaminati senza distinguere tra lettere maiuscole e minuscole.
</para>
<para>
Se <parameter>needle</parameter> non viene trovato, la funzione restituisce &false;.
</para>
<para>
Se <parameter>needle</parameter> non è una stringa, viene convertito in
un intero e si utilizza il valore ordinale del carattere.
</para>
<para>
<example>
<title>Esempio di uso di <function>stristr</function></title>
<programlisting role="php">
<![CDATA[
<?php
$email = 'USER@EXAMPLE.com';
echo stristr($email, 'e');
// outputs ER@EXAMPLE.com
?>
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title>Verifica se una stringa esiste o meno</title>
<programlisting role="php">
<![CDATA[
<?php
$string = 'Hello World!';
if(stristr($string, 'earth') === FALSE) {
echo '"earth" not found in string';
}
// outputs: "earth" not found in string
?>
]]>
</programlisting>
</example>
</para>
<para>
<example>
<title>Utilizzo di un dato non stringa da cercare</title>
<programlisting role="php">
<![CDATA[
<?php
$string = 'APPLE';
echo stristr($string, 97); // 97 = lowercase a
// outputs: APPLE
?>
]]>
</programlisting>
</example>
</para>
¬e.bin-safe;
<para>
Vedere anche
<function>strstr</function>,
<function>strrchr</function>,
<function>substr</function> e
<function>ereg</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
-->