changes in TextLogik.java
This commit is contained in:
		
							parent
							
								
									b0622643d4
								
							
						
					
					
						commit
						7ed50f6d9f
					
				| 
						 | 
				
			
			@ -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();
 | 
			
		||||
                    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue