我将如何对这个示例组合框项目进行子串化
E11-143 - America --> America
JC - Political theory --> Political theory
我试过这个:
string test = comboBox1.Text.Substring(comboBox1.Text.IndexOf('-') + 1).Trim();
但这就是结果
E11-143 - America --> 143 - America
JC - Political theory --> Political theory