changes in TextLogik.java
This commit is contained in:
+2
-3
@@ -69,11 +69,10 @@ public class TextLogik {
|
|||||||
break;
|
break;
|
||||||
case "REPLACE":
|
case "REPLACE":
|
||||||
if (command.length == 1){
|
if (command.length == 1){
|
||||||
text.replace(TextInput.getTextInput(), TextInput.getTextInput());
|
checkIfSuccess(text.replace(TextInput.getTextInput(), TextInput.getTextInput()));
|
||||||
}else if(isNumeric(command[1])) {
|
}else if(isNumeric(command[1])) {
|
||||||
int line = Integer.parseInt(command[1]);
|
int line = Integer.parseInt(command[1]);
|
||||||
|
checkIfSuccess(text.replace(line, TextInput.getTextInput(), TextInput.getTextInput()));
|
||||||
text.replace(line, TextInput.getTextInput(), TextInput.getTextInput());
|
|
||||||
}else {
|
}else {
|
||||||
textOutput.errorInvalidCommand();
|
textOutput.errorInvalidCommand();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user