function

chunk_split . string . sncode

VERSIONlatest Split a string into smaller chunks.

CHUNK_SPLIT

NAME

chunk_split - Splits a string into smaller chunks.

SYNOPSIS

chunk_split(str,chunklen,end)

PARAMETERS

str
The string that will be separated into pieces. chunklen The needed chunk lenght. end The line ending sequence.

RETURN

string
Returns the chunked string. If the user chose to split the word apple in chunk of 2 letters with the * ending sequence, one will get: ap=*pl=*e.

EXAMPLES

Note: In the followings examples, the _ between the { should be removed to make it work.

in:  res={_{chunk_split("hello world",2,"=-")}}.
out: res=he=-ll=-o =-wo=-rl=-d.

in:  res={_{chunk_split("hello world",2)}}.
out: res=he\r
ll\r
o \r
wo\r
rl\r
d").

AUTHOR

Written by Pusnei Sergey and Caroline Laplante, <sergey@sednove.com>