chunk_split()
function chunk_split(string $string, int $length = 76, string $separator = '\r\n'): string
Splits a string into fixed-length chunks separated by a given string.
Parameters:
$string(string)$length(int), default76, optional$separator(string), default'\r\n', optional
Returns: string
Availability
- Compiled (AOT): supported by the Elephc code generator.
eval()(magician interpreter): supported — declarative interpreter builtin (crates/elephc-magician/src/interpreter/builtins/string/chunk_split.rs).
No examples yet — check examples/ and showcases/ for usage patterns.
Internals
For how chunk_split is implemented in the compiler, see the internals page.