Last time I was working on migration of some code from Python into Java and I was trying to find a corresponding code in Java for a function called rstrip in Python. So, below you can see a code written in Python and solution written in Java produced of course using Guava.
icb_code.rstrip("0")
CharMatcher trailingZeroMatcher = CharMatcher.is('0'); String trimmedInput = trailingZeroMatcher.trimTrailingFrom(input);
Python rstrip in Java
2018-07-13T21:34:00+01:00
GarciaPL
Java|Java 8|Python|