如字符串 string answer="A,B,D,",在 js和 C#按","分成数组
js:
var arr = answer.substring(, useranswer.length - ).split(",");
c#:
var arr =item.userAnswer.Split(new Char[]{','}, StringSplitOptions.RemoveEmptyEntries);
方法还很多,可以自己再找几种试试
2022-08-15 19:03:19
如字符串 string answer="A,B,D,",在 js和 C#按","分成数组
js:
var arr = answer.substring(, useranswer.length - ).split(",");
c#:
var arr =item.userAnswer.Split(new Char[]{','}, StringSplitOptions.RemoveEmptyEntries);
方法还很多,可以自己再找几种试试