code: static public String removeTrailingNewLines(String string) {
      	if (string == null) return string;
      	
      	String trimmedString = chomp(string);
  
      	// Loop until the chomp-method does not remove any more trailing NewLines...
      	while (trimmedString.length() < string.length()) {
  			// Try remove one more NewLine
      		string = trimmedString;
  			trimmedString = chomp(string);
  		}
      	
      	return trimmedString;
      	
      }
docs: Removes any trailing new lines from the string.
  A newline is one of &quot;<code>\n</code>&quot;,
  &quot;<code>\r</code>&quot;, or &quot;<code>\r\n</code>&quot;.</p>
  
  @param string
  @return