public static void println(int line, String text) {
        if (line < 1 || line > 6) {
            return;
        }
        //truncate the text if it's longer than the maximum length and add a marker to indicate that it was truncated
        if (text.length() > MAX_LINE_LENGTH) {
            text = text.substring(0, MAX_LINE_LENGTH - TRUNCATE_MARKER.length()) + TRUNCATE_MARKER;
        }
        switch (line) {
            case 1:
                display.println(DriverStationLCD.Line.kUser1, 1, text);
                break;
            case 2:
                display.println(DriverStationLCD.Line.kUser2, 1, text);
                break;
            case 3:
                display.println(DriverStationLCD.Line.kUser3, 1, text);
                break;
            case 4:
                display.println(DriverStationLCD.Line.kUser4, 1, text);
                break;
            case 5:
                display.println(DriverStationLCD.Line.kUser5, 1, text);
                break;
            case 6:
                display.println(DriverStationLCD.Line.kUser6, 1, text);
                break;
        }
    }