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:
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:
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;
alvpickmans,
thank you very much, that was the solution!
Now I have to learn more about design script.
glad it helped