Function __global->chunk_split
Definitions
sources_custom/phpstub.php
- Split a string into smaller chunks. Can be used to split a string into smaller chunks which is useful for e.g. converting base64_encode output to match RFC 2045 semantics. It inserts end (defaults to "\r\n") every chunklen characters.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $body | string | No | No | required parameter | N/A | N/A | The input string |
| $chunklen | integer | No | No | 76 | N/A | N/A | The maximum chunking length |
| $splitter | string | No | No | N/A | N/A | Split character |
Returns
- The chunked version of the input string
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Split a string into smaller chunks. Can be used to split a string into smaller chunks which is useful for e.g. converting base64_encode output to match RFC 2045 semantics. It inserts end (defaults to "\r\n") every chunklen characters.
*
* @param string $body The input string
* @param integer $chunklen The maximum chunking length
* @param string $splitter Split character
* @return string The chunked version of the input string
*/
function chunk_split(string $body, int $chunklen = 76, string $splitter = '
') : string
* Split a string into smaller chunks. Can be used to split a string into smaller chunks which is useful for e.g. converting base64_encode output to match RFC 2045 semantics. It inserts end (defaults to "\r\n") every chunklen characters.
*
* @param string $body The input string
* @param integer $chunklen The maximum chunking length
* @param string $splitter Split character
* @return string The chunked version of the input string
*/
function chunk_split(string $body, int $chunklen = 76, string $splitter = '
') : string

