Routine to rearange spreads of string

Hi all.
I have a 12 elements list of names.

I just need to show the firsts 6 elements of the list.

I would like to find a simple way to replace one of the 6 elements list by another one of the 6 elements which is not shown like this:

intial list:
name1
name2
name3
name4
name5
name6
name7
name8
name9
name10
name11
name12

list rendered by the screen:
name1
name2
name3
name4
name5
name6

how could I simply replace name 3 by name 7 for instance ?

thanks a lot, I hope I’m clear.
g.

check getspread (string)

thanks a lot for the quick response.
I try to use it, but with no good results yet as the patch shown:

I would have need the 12 elements input in an object, and be able to tells by index which element of the 12 elements list I would have need to make the 6 elements list.
I try with getslice…setslice, and getspread…but still doesn’t work…
g.

forums-getspread.v4p (4.2 kB)

here’s what I have so far with setspread…
I don’t really understand the process and logical…so it’s not yet what I’m expecting…
any help would be appreciated, thanks.
g.

forums-setspread.v4p (7.2 kB)

Yes I always dislike it if a node comes without a help patch.

For your last example, I would use a getslice (string) and replace that for the setspread. So you can select the slice you need as a final output.

edit: in your other patch (why name them both the same? hard to refer it too) when you hoover above the output pin of the Getspread you see you have more than 6 strings so to understand what is going on, use Herr Inspector and set the output IObox (String) to that number, or even better, a bit higher.

GetlsiceString.v4p (5.5 kB)

thanks a lot !!
work pretty good !!!

Man you are fast :), but it makes me wonder why the Getslice didn’t work for you.