c# iconfont在后端添加前端显示
public string UnicodeToStr(string unicodeStr) { string outStr = ""; if (!string.IsNullOrEmpty(unicodeStr)) { string[] strlist = unicodeStr.Replace("&#", "").Replace(";", "").Split('x'); try { for (int i = 1; i < strlist.Length; i++) { outStr += (char)int.Parse(strlist[i], System.Globalization.NumberStyles.HexNumber); } } catch (FormatException ex) { outStr = ex.Message; } } return outStr; }
//调用 UnicodeToStr("")