Here you can find the source of rTrimObj(Object o)
public static String rTrimObj(Object o)
//package com.java2s; //License from project: Apache License public class Main { public static String rTrimObj(Object o) { return rTrim(nz(o)); }//from w w w. j a va2s.com /** * Elimina gli spazi a dx della stringa */ public static String rTrim(String s) { if (s == null) { return null; } else { char c[] = s.toCharArray(); int i = s.length() - 1; while (i >= 0 && c[i] == ' ') { i--; } return s.substring(0, i + 1); } } public static String nz(Object o) { return o == null ? "" : o.toString(); } }