cvs: phpdoc-pt_BR /reference/strings/functions strstr.xml
| From: | Fernando Correa da Concei��o | Date: | Fri, 18 Apr 2003 23:28:48 +0000 |
| Subject: | cvs: phpdoc-pt_BR /reference/strings/functions strstr.xml | ||
| Groups: | php.doc.pt-br | ||
| Request: | Send a blank email to doc-pt-br+get-787@lists.php.net to get a copy of this message | ||
fernandoc Fri Apr 18 19:28:48 2003 EDT
Added files:
/phpdoc-pt_BR/reference/strings/functions strstr.xml
Log:
New Translation
Index: phpdoc-pt_BR/reference/strings/functions/strstr.xml
+++ phpdoc-pt_BR/reference/strings/functions/strstr.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- EN-Revision: 1.4 Maintainer: fernandoc Status: ready -->
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
<refentry id="function.strstr">
<refnamediv>
<refname>strstr</refname>
<refpurpose>Encontra a primeira ocorrencia de uma string</refpurpose>
</refnamediv>
<refsect1>
<title>Descrição</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>
Retorna parte da string <parameter>haystack</parameter>
apartir da primeira ocorrencia de <parameter>needle</parameter> até o final de
<parameter>haystack</parameter>.
</para>
<para>
Se <parameter>needle</parameter> não é encontrado, retorna &false;.
</para>
<para>
Se <parameter>needle</parameter> não é uma string, é convertido para um inteiro
e aplicado o valor do caractere.
</para>
<note>
<para>
Esta função diferencia maiúsculas e minúsculas. Para pesquisas que não diferenciem, use
<function>stristr</function>.
</para>
</note>
<para>
<example>
<title>Exemplo <function>strstr</function></title>
<programlisting role="php">
<![CDATA[
$email = 'user@example.com';
$domain = strstr($email, '@');
print $domain; // mostra @example.com
]]>
</programlisting>
</example>
</para>
<para>
<note>
<para>
Se você somente quer determinar se <parameter>needle</parameter>
ocorre em <parameter>haystack</parameter>, use ao invés a função mais rapida e
com menor uso de memória
<function>strpos</function>.
</para>
</note>
</para>
<para>
Veja também <function>ereg</function>,
<function>preg_match</function>,
<function>strchr</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:"../../../../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
-->