本文介绍了根据某个键值(LEDbrightness)从.txt文件中删除一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



i想要根据一些关键值(LEDbrightness)从.txt文件中删除一行。

例如:我将拥有LEDbrightness = 2 in。 txt文件。要么我需要将LEDbrightness的值从2更改为3,要么我需要删除整行LEDbrightness = 2并需要添加LEDbrightness = 3。我可以补充一点。但它增加了现有的。

LEDbrightness = 2

LEDbrightness = 3



i不能删除LEDbrightness = 2。请帮帮我。我真的陷入了这个。

解决方案

Hi,
i want to remove a line from .txt file based on some key value(LEDbrightness).
for eg: i will have LEDbrightness=2 in .txt file . Either i need to change the value of LEDbrightness from 2 to 3 or i need to remove the entire line LEDbrightness=2 and need to add LEDbrightness=3. I am able to add that. but it is adding to the existing one.
LEDbrightness=2
LEDbrightness=3

i am not able to remove LEDbrightness=2. Please help me on this. i m really stuck in this.

解决方案


这篇关于根据某个键值(LEDbrightness)从.txt文件中删除一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-03 00:16