package p78;

public class Tested {
    /**
     * Trims trailing whitespace characters from the given string. This method scans the string
     * from the end towards the beginning, removing any whitespace characters (as determined by
     * {@link Character#isWhitespace(char)}) until a non-whitespace character is encountered or
     * the beginning of the string is reached.
     *
     * <p>If the input string is empty or consists solely of whitespace characters, an empty string
     * is returned.
     *
     * @param s the string to trim; must not be null
     * @return a new string with trailing whitespace removed; never null
     * @throws NullPointerException if the input string {@code s} is null
     */
    public static String rtrim(String s) {
        // TODO: implement this method
    }
}