删除ftp txt文件中的空格 [英] Removing spaces in ftp txt file

查看:80
本文介绍了删除ftp txt文件中的空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一些像这样的代码

Hi, i need some code like that

            int count = listBox2.Items.Count;
            for (int i = count - 1; i >= 0; i--)
            {
                if (listBox2.Items[i].ToString() == " ")
                {
                    listBox2.Items.RemoveAt(i);
                }
            }


但仅限于ftp txt文件。

but just to ftp txt file.

推荐答案

我们需要更多信息,Noam,或者至少是你想要完成的事情。是否要删除txt文件中只有空格的行?你的txt文件实际上有行吗?您可以只使用空字符串替换所有空格stringRplace()
。再说一次,没有更多细节,我不能更具体......
We need some more information, Noam, or at least something along the lines of what you're trying to accomplish. Do you want to remove lines in your txt file that have only spaces? Does your txt file actually have lines? You may be able to just do a string.Replace() to replace all spaces, with an empty string. Again, without more details, I can't be more specific ...


这篇关于删除ftp txt文件中的空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆