在js和C#中split应用和去除字符串分组后的空值
如字符串 string answer="A,B,D,",在 js和 C#按","分成数组
js:
var arr = answer.substring(0, useranswer.length - 1).split(",");
c#:
var arr =item.userAnswer.Split(new Char[]{','}, StringSplitOptions.RemoveEmptyEntries);
方法还很多,可以自己再找几种试试