Dynamo insert string at end in list at index

Hello Forum

I am looking to add an “S” to the end of a string, based on the true index value if more that 1 in the list. I am very close (adding it at the beginning) but I cannot seem to work out how to add this to the end of the string and maintin the list. Could anyone help? This might not be the neatest way either to go about it.

Thank you!
Tim

Hello

Sorry I have figured it out by using a String.Length node as this is what I figured out the index value of the String.Insert node is looking for. I also made use of the FilterByBoolMark maintaining the list structure.


Thanks again
Tim

Just a little more streamlined:

1 Like

Hi Bjorn

This is great, thank you very much. Much neater. I didnt think about the IF node.

Many thanks again!
Tim

Couldn’t help myself from throwing in the same solution even more compressed. :wink:

1 Like

Cheers Jostein! Really neat. Thanks again.