c# - 在 C# 中查找 IndexOf

标签 c#

我如何找到 indexof() 来自:

string value = "     50     ";  

有空格...但我不想使用 SubString()Replace() 删除它们...

我必须删除 leftindex 空格,直到我得到 "5" 并删除 rightindex 之后的空格 "0".

最佳答案

字符串.修剪

关于c# - 在 C# 中查找 IndexOf,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/701105/

相关文章:

c# - 仅使用 Linq 或 Lambda,如何组合这两段代码以返回 List<Entity> e?

c# - 使用 C# 以编程方式重启 Windows Mobile 6.x 设备

c# - 在窗体之间传递值 (winforms)

c# - Mono c# TextRenderingHint.SingleBitPerPixelGridFit Windows 与 Linux

c# - 在 C# 中搜索 2 个日期时间之间的值

c# - 如何使用 string.Format() 来格式化用大括号包围的十六进制数?

c# - DateTime 属性的必需属性

c# - 如何修复ObjectDisposedException未处理?

c# - 基于数据集的.NET程序: Use Designer tools or do it self?

c# - 多层解决方案中的 StructureMap