changes in TextLogik.java

This commit is contained in:
schrom01 2021-11-11 14:45:36 +01:00
parent b0622643d4
commit 7ed50f6d9f
1 changed files with 2 additions and 3 deletions

View File

@ -69,11 +69,10 @@ public class TextLogik {
break;
case "REPLACE":
if (command.length == 1){
text.replace(TextInput.getTextInput(), TextInput.getTextInput());
checkIfSuccess(text.replace(TextInput.getTextInput(), TextInput.getTextInput()));
}else if(isNumeric(command[1])) {
int line = Integer.parseInt(command[1]);
text.replace(line, TextInput.getTextInput(), TextInput.getTextInput());
checkIfSuccess(text.replace(line, TextInput.getTextInput(), TextInput.getTextInput()));
}else {
textOutput.errorInvalidCommand();
}