★ wanayoo — archive 1999 http://www.php.net/manual/fr/function.chunk-split.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Chaînes
Quick Reference
English version of this pageGerman version of this pageJapanese version of this pageItalian version of this pageHungarian version of this page
Chaînes
* AddCSlashes
* AddSlashes
* bin2hex
* Chop
* Chr
* chunk_split
* convert_cyr_string
* count_chars
* crypt
* echo
* explode
* flush
* get_html_translation_table
* get_meta_tags
* htmlentities
* htmlspecialchars
* implode
* join
* ltrim
* md5
* Metaphone
* nl2br
* Ord
* parse_str
* print
* printf
* quoted_printable_decode
* QuoteMeta
* rawurldecode
* rawurlencode
* setlocale
* similar_text
* soundex
* sprintf
* strcasecmp
* strchr
* strcmp
* strcspn
* strip_tags
* StripCSlashes
* StripSlashes
* stristr
* strlen
* strpos
* strrchr
* str_repeat
* strrev
* strrpos
* strspn
* strstr
* strtok
* strtolower
* strtoupper
* str_replace
* strtr
* substr
* substr_replace
* trim
* ucfirst
* ucwords
Manual: chunk_split
View the source code for this pageSearch the site



Previous page
 Chr
 Updated
Sun, 06 Aug 2000
convert_cyr_string 
Next page


chunk_split

(PHP3 >= 3.0.6, PHP4 )

chunk_split -- Scinde une chaîne en plus petits morceaux.

Description

string chunk_split (string string [, int chunklen [, string end]])

Permet de scinder une chaîne en plus petit morceaux, comme dans le cas de la conversion en base64_encode pour se conformer à la RFC 2045. Cette fonction insère une fin de chaîne end (par défaut "\r\n"), tous les chunklen (par défaut 76) caractères. La chaîne retournée est une nouvelle chaîne, et l’original n’est pas modifié.

Exemple 1. Exemple avec Chunk_split()


# formate $data avec la sémantique RFC 2045

$new_string = chunk_split (base64_encode($data));
      
Cette fonction est nettement plus rapide que ereg_replace().

Note: Cette fonction a été ajoutée en 3.0.6.


User Contributed Notes: chunk_split


ems@itg.net
31-Jan-2000 02:21
a homebrew version of chunk_split is available at:

http://renoir.vill.edu/~ylee/mailfile.html



 About Notes


Previous page
 Chr
 Updated
Sun, 06 Aug 2000
convert_cyr_string 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
United States
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.