Remove Character of a string

I have a list of strings and I want to remove the last charater of each string if it ends with 0.
Is there a simple way, the structure of the list has to remain.

The result should look like this:


Something like this can work.

Thank you alvpickmans, but what is wrong here?

I am working with Revit 2018 and Dynamo

I think you might have another package that also have a String class and design script tries to use it instead of the core one (that is why it appears as an input on the code block).
Try with this code instead:
DSCore.String.Substring(str, -1, 1) == "0" ? DSCore.String.Remove(str, -1, 1) : str;



thank you very much, that was the solution!
Now I have to learn more about design script.

glad it helped :slight_smile: