protected static StringBuilder removeNewLineSignFromEnd(StringBuilder text) {
        if (text.charAt(text.length() - 1) == '\n') {
            return new StringBuilder(text.substring(0, text.length() - 1));
        } else {
            return text;
        }
    }