Delete last Character of String if it's "0"

Thanks for your reply. Works perfectly fine :slight_smile:

In case someone looking for another solution, I solved it with Java Snippet (simple) node:

String str = $yourString$;

if (str.endsWith(β€œ0”)){
str = str.substring(0, str.length() - 1);
return str;
} else {
return str;
}

3 Likes