September 2001
Intermediate to advanced
768 pages
32h 45m
English
string chunk_split(string string, [int chunk_length], [string chunk_ending])
| string | String to split into chunks |
| chunk_length | Length of the chunks (default 76) |
| chunk_ending | Character(s) to place at the end of each chunk (default \r\n) |
Breaks a string into a series of smaller chunks.
Returns:
String with chunk_ending placed every chunk_length
Description:
chunk_split() adds the character(s) specified in chunk_ending every chunk_length characters. This function is useful for breaking certain types of data into separate lines of a specified length. It’s often used to make base64 encoded data conform to RFC 2045.
Note:
This function should not be used for breaking long lines of text into shorter lines for display purposes—use ...
Read now
Unlock full access