1 2 3 4 5 6 7 8 9 10 11 12
package org.jetbrains.java.decompiler.util; import java.util.regex.Pattern; public class Util { private final static Pattern RTRIM = Pattern.compile("\\s+$"); public static String rtrim(String s) { return RTRIM.matcher(s).replaceAll(""); } }