Я ищу небольшой фрагмент кода, который найдет строку в файле и удалит эту строку (а не контент, но строка), но не смог найти. Так, например, у меня есть следующий файл:
Myfile.txt
aaa
bbb
ccc
ddd
Нужно иметь такую функцию: public void removeLine(String lineContent)
, и если я пройду
removeLine("bbb")
, я получаю файл следующим образом:
Myfile.txt:
aaa
ccc
ddd