是否有一个命令可以获取字符串中字符的第三个索引?例如:
error: file.ext: line 10: invalid command [test:)]
在上面的句子中,我想要第3个冒号的索引,10个旁边的那个.我怎么能这样做?我知道string.IndexOf和string.LastIndexOf,但在这种情况下我想得到第三次使用时字符的索引.
.net c# string indexing
.net ×1
c# ×1
indexing ×1
string ×1