Login  Register

Re: can I divide a string into part of exactly n length

Posted by Richard Sargent on Apr 27, 2020; 5:05pm
URL: https://forum.world.st/can-I-divide-a-string-into-part-of-exactly-n-length-tp5115703p5115710.html

On Mon, Apr 27, 2020 at 9:27 AM Roelof Wobben via Pharo-users <[hidden email]> wrote:
Hello,

I wonder if it is possible in Pharo to divide a string in lets say part
of 3.
so this :  'abcdefgh'

would be  'abc def gh`

Do you really want a single string with spaces inserted or do you want a collection of substrings, each three characters (or less, for the last one)?



Regards,

Roelof