Sophie

Sophie

distrib > Mandriva > 2008.1 > i586 > by-pkgid > 703d980c580707c382b4e43e25965bc5 > files > 1687

php-manual-pt_BR-5.2.4-1mdv2008.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>iconv_strpos</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="Manual do PHP"
HREF="index.html"><LINK
REL="UP"
TITLE="iconv Functions"
HREF="ref.iconv.html"><LINK
REL="PREVIOUS"
TITLE="iconv_strlen"
HREF="function.iconv-strlen.html"><LINK
REL="NEXT"
TITLE="iconv_strrpos"
HREF="function.iconv-strrpos.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=UTF-8"></HEAD
><BODY
CLASS="refentry"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Manual do PHP</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.iconv-strlen.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.iconv-strrpos.html"
ACCESSKEY="N"
>Próxima</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><H1
><A
NAME="function.iconv-strpos"
></A
>iconv_strpos</H1
><DIV
CLASS="refnamediv"
><A
NAME="AEN80616"
></A
><P
>    (PHP 5)</P
>iconv_strpos&nbsp;--&nbsp;Finds position of first occurrence of a needle within a haystack</DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN80619"
></A
><H2
>Descrição</H2
>int <B
CLASS="methodname"
>iconv_strpos</B
> ( string haystack, string needle [, int offset [, string charset]] )<BR
></BR
><P
>&#13;   Finds position of first occurrence of a needle within a haystack.
  </P
><P
>&#13;   In contrast to <A
HREF="function.strpos.html"
><B
CLASS="function"
>strpos()</B
></A
>, the return value of
   <B
CLASS="function"
>iconv_strpos()</B
> is the number of characters that
   appear before the needle, rather than the offset in bytes to the
   position where the needle has been found. The characters are counted
   on the basis of the specified character set <CODE
CLASS="parameter"
>charset</CODE
>.
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN80641"
></A
><H2
>Parâmetros</H2
><P
>&#13;   <P
></P
><DIV
CLASS="variablelist"
><DL
><DT
><CODE
CLASS="parameter"
>haystack</CODE
></DT
><DD
><P
>&#13;       The entire string.
      </P
></DD
><DT
><CODE
CLASS="parameter"
>needle</CODE
></DT
><DD
><P
>&#13;       The searched substring.
      </P
></DD
><DT
><CODE
CLASS="parameter"
>offset</CODE
></DT
><DD
><P
>&#13;       The optional <CODE
CLASS="parameter"
>offset</CODE
> parameter specifies
       the position from which the search should be performed.
      </P
></DD
><DT
><CODE
CLASS="parameter"
>charset</CODE
></DT
><DD
><P
>&#13;       If <CODE
CLASS="parameter"
>charset</CODE
> parameter is omitted,
       <CODE
CLASS="parameter"
>string</CODE
> are assumed to be encoded in
       <A
HREF="ref.iconv.html#iconv.configuration"
>iconv.internal_encoding</A
>.
      </P
></DD
></DL
></DIV
>
  </P
><P
>&#13;   If <CODE
CLASS="parameter"
>haystack</CODE
> or <CODE
CLASS="parameter"
>needle</CODE
> is
   not a string, it is converted to a string and applied as the ordinal
   value of a character.
  </P
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN80672"
></A
><H2
>Valores de retornado</H2
><P
>&#13;   Returns the numeric position of the first occurrence of
   <CODE
CLASS="parameter"
>needle</CODE
> in <CODE
CLASS="parameter"
>haystack</CODE
>.
  </P
><P
>&#13;   If <CODE
CLASS="parameter"
>needle</CODE
> is not found,
   <B
CLASS="function"
>iconv_strpos()</B
> will return <TT
CLASS="constant"
><B
>FALSE</B
></TT
>.
  </P
><DIV
CLASS="warning"
><P
></P
><TABLE
CLASS="warning"
BORDER="1"
WIDTH="100%"
><TR
><TD
ALIGN="CENTER"
><B
>Atenção</B
></TD
></TR
><TR
><TD
ALIGN="LEFT"
><P
>Esta função pode
 retornar o booleano <TT
CLASS="constant"
><B
>FALSE</B
></TT
>, mas também pode retornar um valor não-booleano que pode ser
 avaliado como <TT
CLASS="constant"
><B
>FALSE</B
></TT
>, como <TT
CLASS="literal"
>0</TT
> ou
 "". Leia a seção em <A
HREF="language.types.boolean.html"
>Booleanos</A
> para maiores
 informações. Utilize o <A
HREF="language.operators.comparison.html"
>operador ===
 </A
> para testar o valor retornado por esta
 função.</P
></TD
></TR
></TABLE
></DIV
></DIV
><DIV
CLASS="refsect1"
><A
NAME="AEN80688"
></A
><H2
>Veja também</H2
><P
>&#13;   <P
></P
><TABLE
BORDER="0"
><TBODY
><TR
><TD
><A
HREF="function.strpos.html"
><B
CLASS="function"
>strpos()</B
></A
></TD
></TR
><TR
><TD
><A
HREF="function.iconv-strrpos.html"
><B
CLASS="function"
>iconv_strrpos()</B
></A
></TD
></TR
><TR
><TD
><A
HREF="function.mb-strpos.html"
><B
CLASS="function"
>mb_strpos()</B
></A
></TD
></TR
></TBODY
></TABLE
><P
></P
>
  </P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.iconv-strlen.html"
ACCESSKEY="P"
>Anterior</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Principal</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.iconv-strrpos.html"
ACCESSKEY="N"
>Próxima</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>iconv_strlen</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ref.iconv.html"
ACCESSKEY="U"
>Acima</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>iconv_strrpos</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>