C# 把ABCD转换成数字
2021-04-03 12:25
阅读:576
标签:html abc arp amp convert trim i++ app ima
每倒题得选项可能是多选或者单选。
public static string LetterTransformationNum(string answer, int type) { string num = ""; if (type == 1 || type == 2) //(1和2代表单选和多选) { var str = answer; //去答案 str = TrimAllHtmlTag(str).Replace("】", ""); StringBuilder sp = new StringBuilder(); for (int i = 0; i = ‘A‘ && str[i]
去掉一些特殊得字符正则
public static string TrimAllHtmlTag(string str) { string reg = "]+?)>"; return Regex.Replace(str, reg, "").Trim(); }
C# 把ABCD转换成数字
标签:html abc arp amp convert trim i++ app ima
原文地址:https://www.cnblogs.com/sunliyuan/p/9203223.html
评论
亲,登录后才可以留言!