String removeNewLine(StringBuilder sb) {
		if (sb == null) return null;
		if (sb.length() <= 0) return "";

		// Remove trailing newlines
		for (char c = sb.charAt(sb.length() - 1); c == '\r' || c == '\n';) {
			sb.deleteCharAt(sb.length() - 1);

			if (sb.length() > 0) c = sb.charAt(sb.length() - 1);
			else break;
		}
		return sb.toString();
	}