我有一个字符串“ABD-DDD-RED-Large”,需要提取“DDD-RED”
使用拆分我有:
var split = "ABD-DDD-RED-Large".Split('-');
var first = split[0];
var second = split[1];
var third = split[2];
var fourth = split[3];
string value = string.Join("-", second, third);
只是想知道是否有更短的代码
慕侠2389804
相关分类