class StringSimpleFieldActions implements AtlasFieldAction {

    @AtlasActionProcessor
    public static String trimRight(TrimRight action, String input) {
        if (input == null || input.length() == 0) {
            return input;
        }

        int i = input.length() - 1;
        while (i >= 0 && Character.isWhitespace(input.charAt(i))) {
            i--;
        }
        return input.substring(0, i + 1);
    }

}