File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
text-io/src/main/java/org/beryx/textio Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,20 @@ default void println(String message) {
177177 println ();
178178 }
179179
180+ /**
181+ * Prints a decorated line separator with a character of choice determined by the String parameter.
182+ * the length parameter dictates how many characters the decorator should be.
183+ * the decorator does not need to be a single character ie : '*' ... it could also be ie '+++' if desired.
184+ */
185+ default void separateLineWithDecorator (String s , int length ) {
186+ String separator = "" ;
187+ for (int i = 0 ; i < length ; i ++){
188+ separator = separator + s ;
189+ }
190+ print (separator );
191+ println ();
192+ }
193+
180194 /**
181195 * Prints each message in the list, inserting the line separator string between messages.
182196 * No separator string is printed after the last message.
You can’t perform that action at this time.
0 commit comments