code: public static int getRightTrimSise(String s, char trim) {
  
          int endindex = s.length();
  
          for (--endindex; endindex >= 0 && s.charAt(endindex) == trim;
                  endindex--) {}
  
          endindex++;
  
          return endindex;
      }
docs: /*
  public static Object concat(Object a, Object b) {
  
  if (a == null || b == null) {
  return null;
  }
  
  return a.toString() + b.toString();
  }