Removing brackets in a string

Hello,

I attached a dynamo file which writes the bottom level of a beam to the “comments” parameter of the element (i will create a proper shared parameter later on).

The problem is that :

  • the string is enclosed in brackets,

  • the many zero’s at the end.

Knipsel

 

 

 

I would like to remove these because they will get part of a custom tag.

Any help is much appreciated.

Jo

TOEKENNEN_BOVENZIJDEVLOERPLAAT

Just use String.FromObject node on the list of numbers. Much cleaner and you don’t need a List.Map node.

Thanks !

Thanks Andreas Dieckmann for providing solution.

Johan Moens We noticed that ToString is not behaving correctly and we are fixing that issue.

Thanks,

Ritesh

@Andreas: in my setup, I need to use the ‘string from array’ node… to get the listed results I need… see image. And I too would like to remove the brackets. Is there a node out there that will remove a specific character (the bracket) from a string?

any advice in the right direction would be very appreciated.

 

nevermind… i found it!

@Mike_Taylor can you share the solution for this, please? I’m looking for the same. Thank you

String.Replace would do the trick. You may need two of them to catch the opening and closing bracket.

You could also use String.SubString taking the first to the 2nd to last characters, but that would not work with nested lists.