Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > media > main > by-pkgid > 0afeee9cca140e167a996902b9a677c5 > files > 3143

php-manual-en-4.3.0-2mdk.noarch.rpm

<HTML
><HEAD
><TITLE
>String functions</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="PHP Manual"
HREF="index.html"><LINK
REL="UP"
TITLE="Function Reference"
HREF="funcref.html"><LINK
REL="PREVIOUS"
TITLE="stream_set_write_buffer"
HREF="function.stream-set-write-buffer.html"><LINK
REL="NEXT"
TITLE="addcslashes"
HREF="function.addcslashes.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=ISO-8859-1"></HEAD
><BODY
CLASS="reference"
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"
>PHP Manual</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.stream-set-write-buffer.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.addcslashes.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="reference"
><A
NAME="ref.strings"
></A
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="title"
>XCIX. String functions</H1
><DIV
CLASS="PARTINTRO"
><A
NAME="AEN88976"
></A
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="strings.intro"
></A
>Introduction</H1
><P
>&#13;     These functions all manipulate strings in various ways. Some more
     specialized sections can be found in the regular expression and
     <A
HREF="ref.url.html"
>URL handling</A
> sections.
    </P
><P
>&#13;     For information on how strings behave, especially with regard to
     usage of single quotes, double quotes, and escape sequences, see
     the <A
HREF="language.types.string.html"
>Strings</A
> entry in
     the <A
HREF="language.types.html"
>Types</A
> section of the
     manual.
    </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="strings.requirements"
></A
>Requirements</H1
><P
>No external libraries are needed to build this extension.</P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="strings.installation"
></A
>Installation</H1
><P
>There is no installation needed to use these
functions; they are part of the PHP core.</P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="strings.constants"
></A
>Predefined Constants</H1
><P
>This extension has no constants defined.</P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="strings.seealso"
></A
>See Also</H1
><P
>&#13;     For even more powerful string handling and manipulating functions
     take a look at the <A
HREF="ref.regex.html"
>POSIX regular
     expression functions</A
> and the <A
HREF="ref.pcre.html"
>Perl
     compatible regular expression functions</A
>.
    </P
></DIV
></DIV
><DIV
CLASS="TOC"
><DL
><DT
><B
>Table of Contents</B
></DT
><DT
><A
HREF="function.addcslashes.html"
>addcslashes</A
>&nbsp;--&nbsp;Quote string with slashes in a C style</DT
><DT
><A
HREF="function.addslashes.html"
>addslashes</A
>&nbsp;--&nbsp;Quote string with slashes</DT
><DT
><A
HREF="function.bin2hex.html"
>bin2hex</A
>&nbsp;--&nbsp;
     Convert binary data into hexadecimal representation
    </DT
><DT
><A
HREF="function.chop.html"
>chop</A
>&nbsp;--&nbsp;Alias of <A
HREF="function.rtrim.html"
><B
CLASS="function"
>rtrim()</B
></A
></DT
><DT
><A
HREF="function.chr.html"
>chr</A
>&nbsp;--&nbsp;Return a specific character</DT
><DT
><A
HREF="function.chunk-split.html"
>chunk_split</A
>&nbsp;--&nbsp;Split a string into smaller chunks</DT
><DT
><A
HREF="function.convert-cyr-string.html"
>convert_cyr_string</A
>&nbsp;--&nbsp;
     Convert from one Cyrillic character set to another
    </DT
><DT
><A
HREF="function.count-chars.html"
>count_chars</A
>&nbsp;--&nbsp;
     Return information about characters used in a string
    </DT
><DT
><A
HREF="function.crc32.html"
>crc32</A
>&nbsp;--&nbsp;Calculates the crc32 polynomial of a string</DT
><DT
><A
HREF="function.crypt.html"
>crypt</A
>&nbsp;--&nbsp;One-way string encryption (hashing)</DT
><DT
><A
HREF="function.echo.html"
>echo</A
>&nbsp;--&nbsp;Output one or more strings</DT
><DT
><A
HREF="function.explode.html"
>explode</A
>&nbsp;--&nbsp;Split a string by string</DT
><DT
><A
HREF="function.fprintf.html"
>fprintf</A
>&nbsp;--&nbsp;Write a formatted string to a stream</DT
><DT
><A
HREF="function.get-html-translation-table.html"
>get_html_translation_table</A
>&nbsp;--&nbsp;
     Returns the translation table used by
     <A
HREF="function.htmlspecialchars.html"
><B
CLASS="function"
>htmlspecialchars()</B
></A
> and
     <A
HREF="function.htmlentities.html"
><B
CLASS="function"
>htmlentities()</B
></A
>
    </DT
><DT
><A
HREF="function.hebrev.html"
>hebrev</A
>&nbsp;--&nbsp;
     Convert logical Hebrew text to visual text
    </DT
><DT
><A
HREF="function.hebrevc.html"
>hebrevc</A
>&nbsp;--&nbsp;
     Convert logical Hebrew text to visual text with newline conversion
    </DT
><DT
><A
HREF="function.html-entity-decode.html"
>html_entity_decode</A
>&nbsp;--&nbsp;
     Convert all HTML entities to their applicable characters
    </DT
><DT
><A
HREF="function.htmlentities.html"
>htmlentities</A
>&nbsp;--&nbsp;
     Convert all applicable characters to HTML entities
    </DT
><DT
><A
HREF="function.htmlspecialchars.html"
>htmlspecialchars</A
>&nbsp;--&nbsp;
     Convert special characters to HTML entities
    </DT
><DT
><A
HREF="function.implode.html"
>implode</A
>&nbsp;--&nbsp;Join array elements with a string</DT
><DT
><A
HREF="function.join.html"
>join</A
>&nbsp;--&nbsp;Join array elements with a string</DT
><DT
><A
HREF="function.levenshtein.html"
>levenshtein</A
>&nbsp;--&nbsp;
     Calculate Levenshtein distance between two strings
    </DT
><DT
><A
HREF="function.localeconv.html"
>localeconv</A
>&nbsp;--&nbsp;Get numeric formatting information</DT
><DT
><A
HREF="function.ltrim.html"
>ltrim</A
>&nbsp;--&nbsp;
     Strip whitespace from the beginning of a string
    </DT
><DT
><A
HREF="function.md5-file.html"
>md5_file</A
>&nbsp;--&nbsp;Calculates the md5 hash of a given filename</DT
><DT
><A
HREF="function.md5.html"
>md5</A
>&nbsp;--&nbsp;Calculate the md5 hash of a string</DT
><DT
><A
HREF="function.metaphone.html"
>metaphone</A
>&nbsp;--&nbsp;Calculate the metaphone key of a string</DT
><DT
><A
HREF="function.money-format.html"
>money_format</A
>&nbsp;--&nbsp;Formats a number as a currency string</DT
><DT
><A
HREF="function.nl-langinfo.html"
>nl_langinfo</A
>&nbsp;--&nbsp;
     Query language and locale information
    </DT
><DT
><A
HREF="function.nl2br.html"
>nl2br</A
>&nbsp;--&nbsp;
     Inserts HTML line breaks before all newlines in a string
    </DT
><DT
><A
HREF="function.number-format.html"
>number_format</A
>&nbsp;--&nbsp;Format a number with grouped thousands</DT
><DT
><A
HREF="function.ord.html"
>ord</A
>&nbsp;--&nbsp;Return ASCII value of character</DT
><DT
><A
HREF="function.parse-str.html"
>parse_str</A
>&nbsp;--&nbsp;Parses the string into variables</DT
><DT
><A
HREF="function.print.html"
>print</A
>&nbsp;--&nbsp;Output a string</DT
><DT
><A
HREF="function.printf.html"
>printf</A
>&nbsp;--&nbsp;Output a formatted string</DT
><DT
><A
HREF="function.quoted-printable-decode.html"
>quoted_printable_decode</A
>&nbsp;--&nbsp;
     Convert a quoted-printable string to an 8 bit string
    </DT
><DT
><A
HREF="function.quotemeta.html"
>quotemeta</A
>&nbsp;--&nbsp;Quote meta characters</DT
><DT
><A
HREF="function.rtrim.html"
>rtrim</A
>&nbsp;--&nbsp;
     Strip whitespace from the end of a string
    </DT
><DT
><A
HREF="function.setlocale.html"
>setlocale</A
>&nbsp;--&nbsp;Set locale information</DT
><DT
><A
HREF="function.sha1-file.html"
>sha1_file</A
>&nbsp;--&nbsp;Calculate the sha1 hash of a file</DT
><DT
><A
HREF="function.sha1.html"
>sha1</A
>&nbsp;--&nbsp;Calculate the sha1 hash of a string</DT
><DT
><A
HREF="function.similar-text.html"
>similar_text</A
>&nbsp;--&nbsp;
     Calculate the similarity between two strings
    </DT
><DT
><A
HREF="function.soundex.html"
>soundex</A
>&nbsp;--&nbsp;Calculate the soundex key of a string</DT
><DT
><A
HREF="function.sprintf.html"
>sprintf</A
>&nbsp;--&nbsp;Return a formatted string</DT
><DT
><A
HREF="function.sscanf.html"
>sscanf</A
>&nbsp;--&nbsp;
     Parses input from a string according to a format
    </DT
><DT
><A
HREF="function.str-pad.html"
>str_pad</A
>&nbsp;--&nbsp;
     Pad a string to a certain length with another string
    </DT
><DT
><A
HREF="function.str-repeat.html"
>str_repeat</A
>&nbsp;--&nbsp;Repeat a string</DT
><DT
><A
HREF="function.str-replace.html"
>str_replace</A
>&nbsp;--&nbsp;
     Replace all occurrences of the search string with the replacement string
    </DT
><DT
><A
HREF="function.str-rot13.html"
>str_rot13</A
>&nbsp;--&nbsp;Perform the rot13 transform on a string</DT
><DT
><A
HREF="function.str-shuffle.html"
>str_shuffle</A
>&nbsp;--&nbsp;Randomly shuffles a string</DT
><DT
><A
HREF="function.str-word-count.html"
>str_word_count</A
>&nbsp;--&nbsp;
     Return information about words used in a string
    </DT
><DT
><A
HREF="function.strcasecmp.html"
>strcasecmp</A
>&nbsp;--&nbsp;
     Binary safe case-insensitive string comparison
    </DT
><DT
><A
HREF="function.strchr.html"
>strchr</A
>&nbsp;--&nbsp;
     Find the first occurrence of a character
    </DT
><DT
><A
HREF="function.strcmp.html"
>strcmp</A
>&nbsp;--&nbsp;Binary safe string comparison</DT
><DT
><A
HREF="function.strcoll.html"
>strcoll</A
>&nbsp;--&nbsp;Locale based string comparison</DT
><DT
><A
HREF="function.strcspn.html"
>strcspn</A
>&nbsp;--&nbsp;
     Find length of initial segment not matching mask
    </DT
><DT
><A
HREF="function.strip-tags.html"
>strip_tags</A
>&nbsp;--&nbsp;Strip HTML and PHP tags from a string</DT
><DT
><A
HREF="function.stripcslashes.html"
>stripcslashes</A
>&nbsp;--&nbsp;
     Un-quote string quoted with <A
HREF="function.addcslashes.html"
><B
CLASS="function"
>addcslashes()</B
></A
>
    </DT
><DT
><A
HREF="function.stripslashes.html"
>stripslashes</A
>&nbsp;--&nbsp;
     Un-quote string quoted with <A
HREF="function.addslashes.html"
><B
CLASS="function"
>addslashes()</B
></A
>
    </DT
><DT
><A
HREF="function.stristr.html"
>stristr</A
>&nbsp;--&nbsp;
     Case-insensitive <A
HREF="function.strstr.html"
><B
CLASS="function"
>strstr()</B
></A
>
    </DT
><DT
><A
HREF="function.strlen.html"
>strlen</A
>&nbsp;--&nbsp;Get string length</DT
><DT
><A
HREF="function.strnatcasecmp.html"
>strnatcasecmp</A
>&nbsp;--&nbsp;
     Case insensitive string comparisons using a "natural order"
     algorithm
    </DT
><DT
><A
HREF="function.strnatcmp.html"
>strnatcmp</A
>&nbsp;--&nbsp;
     String comparisons using a "natural order" algorithm
    </DT
><DT
><A
HREF="function.strncasecmp.html"
>strncasecmp</A
>&nbsp;--&nbsp;
     Binary safe case-insensitive string comparison of the first n
     characters
    </DT
><DT
><A
HREF="function.strncmp.html"
>strncmp</A
>&nbsp;--&nbsp;
     Binary safe string comparison of the first n characters
    </DT
><DT
><A
HREF="function.strpos.html"
>strpos</A
>&nbsp;--&nbsp;
     Find position of first occurrence of a string
    </DT
><DT
><A
HREF="function.strrchr.html"
>strrchr</A
>&nbsp;--&nbsp;
     Find the last occurrence of a character in a string
    </DT
><DT
><A
HREF="function.strrev.html"
>strrev</A
>&nbsp;--&nbsp;Reverse a string</DT
><DT
><A
HREF="function.strrpos.html"
>strrpos</A
>&nbsp;--&nbsp;
     Find position of last occurrence of a char in a string
    </DT
><DT
><A
HREF="function.strspn.html"
>strspn</A
>&nbsp;--&nbsp;
     Find length of initial segment matching mask
    </DT
><DT
><A
HREF="function.strstr.html"
>strstr</A
>&nbsp;--&nbsp;Find first occurrence of a string</DT
><DT
><A
HREF="function.strtok.html"
>strtok</A
>&nbsp;--&nbsp;Tokenize string</DT
><DT
><A
HREF="function.strtolower.html"
>strtolower</A
>&nbsp;--&nbsp;Make a string lowercase</DT
><DT
><A
HREF="function.strtoupper.html"
>strtoupper</A
>&nbsp;--&nbsp;Make a string uppercase</DT
><DT
><A
HREF="function.strtr.html"
>strtr</A
>&nbsp;--&nbsp;Translate certain characters</DT
><DT
><A
HREF="function.substr-count.html"
>substr_count</A
>&nbsp;--&nbsp;Count the number of substring occurrences</DT
><DT
><A
HREF="function.substr-replace.html"
>substr_replace</A
>&nbsp;--&nbsp;Replace text within a portion of a string</DT
><DT
><A
HREF="function.substr.html"
>substr</A
>&nbsp;--&nbsp;Return part of a string</DT
><DT
><A
HREF="function.trim.html"
>trim</A
>&nbsp;--&nbsp;
     Strip whitespace from the beginning and end of a string
    </DT
><DT
><A
HREF="function.ucfirst.html"
>ucfirst</A
>&nbsp;--&nbsp;Make a string's first character uppercase</DT
><DT
><A
HREF="function.ucwords.html"
>ucwords</A
>&nbsp;--&nbsp;
     Uppercase the first character of each word in a string
    </DT
><DT
><A
HREF="function.vprintf.html"
>vprintf</A
>&nbsp;--&nbsp;Output a formatted string</DT
><DT
><A
HREF="function.vsprintf.html"
>vsprintf</A
>&nbsp;--&nbsp;Return a formatted string</DT
><DT
><A
HREF="function.wordwrap.html"
>wordwrap</A
>&nbsp;--&nbsp;
     Wraps a string to a given number of characters using a string
     break character.
    </DT
></DL
></DIV
></DIV
></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.stream-set-write-buffer.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.addcslashes.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>stream_set_write_buffer</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="funcref.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>addcslashes</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>