Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions text-io/src/main/java/org/beryx/textio/TextTerminal.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,20 @@ default void println(String message) {
println();
}

/**
* Prints a decorated line separator with a character of choice determined by the String parameter.
* the length parameter dictates how many characters the decorator should be.
* the decorator does not need to be a single character ie : '*' ... it could also be ie '+++' if desired.
*/
default void separateLineWithDecorator(String s, int length) {
String separator = "";
for (int i = 0; i < length; i++){
separator = separator + s;
}
print(separator);
println();
}

/**
* Prints each message in the list, inserting the line separator string between messages.
* No separator string is printed after the last message.
Expand Down