code: public static String rightStr(String str, int length) {
  		return str.substring(Math.max(0, str.length() - length));
  	}
docs: Returns a substring of the given string, representing the 'length' most-right characters