我想逐字遍历字符串。
如果我有一个字符串“incidentno and fintype or unitno”,我想将每个单词一个一个地读为“incidentno”、“and”、“fintype”、“or”和“unitno”。
最佳答案
foreach (string word in "incidentno and fintype or unitno".Split(' ')) {
...
}
关于c# - 如何在 C# 中逐字迭代字符串?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1442955/