split text(size)
This function splits text a into substrings of length b and adds them to list c. The procedure is repeated for the remaining substring until it is empty. The last substring can therefore have a length smaller than b. The return value of the function is the number of substrings added to list c.
Parameter d allows you to remove leading and trailing whitespaces.
Parameters
Parameter |
Description |
a |
Text. |
b |
Substring length. |
c |
Name of list for substrings. Note: If the list does not already exist, it is created automatically. |
d |
(optional) true to remove leading and trailing whitespaces. Default: false. |
Examples
Parameter a |
Parameter b |
Parameter c |
Parameter d |
Result |
This text is used for testing! |
4 |
list_text_split |
true |
8 (List list_text_split with values {This,tex,t is,use,d fo,r te,stin,g!}) |
This text is used for testing! |
4 |
list_text_split |
false |
8 (List list_text_split with values {This, tex,t is, use,d fo,r te,stin,g!}) |