wörterspiel/Format.java gelöscht

main
Tobias Gladhorn 2025-01-09 09:27:36 +01:00
parent f8b7cf4c0b
commit 5f21856c35
1 changed files with 0 additions and 44 deletions

View File

@ -1,44 +0,0 @@
public class Format {
public static String padword(String word, int pad) {
String result = ">>"+word;
if (result.length() >= pad-2) {
result += "<<";
}
else {
while(result.length() <= pad-2) {
result += "-";
}
result += "<<";
}
return result;
}
public static String midpadword(String word, int pad) {
String result = word;
if (result.length() >= pad-4) {
result =">>" + result + "<<";
}
else {
while(result.length() <= pad-4) {
result = "-" + result + "-";
}
result =">>" + result + "<<";
}
return result;
}
public static void pad(int input) {
String result = "#";
while(result.length() < input) {
result += "#";
}
System.out.println(result);
}
}