zoukankan      html  css  js  c++  java
  • 富文本二进制转换成string

     var explainString = Encoding.Unicode.GetString(list[0].KindExplain);
                    if (explainString.IndexOf("u003cimg") > -1)
                    {
                        explainString =
                            explainString.Substring(0, explainString.IndexOf("u003cimg") + 5) + "  src="" + Request.Url.Host + ":" + Request.Url.Port +explainString.Substring(explainString.IndexOf("src=") + 5, explainString.IndexOf(""", explainString.IndexOf("src=") + 7) + 1 - (explainString.IndexOf("src=") + 5)) + " " + explainString.Substring(explainString.IndexOf("/u003e", explainString.IndexOf("u003cimg") + 5), explainString.Length - explainString.IndexOf("/u003e", explainString.IndexOf("u003cimg") + 5));
                    }
                    return Json(explainString, JsonRequestBehavior.AllowGet);

       若是有图片,填上ip地址和端口号

  • 相关阅读:
    Openstack CloudKitty 计量计费命令行操作
    $out表单提交转成数组
    AddWhere
    正则
    全选反选
    showErr()
    模拟登陆
    MYSQL添加权限
    三元相位符
    打开ci 调试
  • 原文地址:https://www.cnblogs.com/llljpf/p/7660847.html
Copyright © 2011-2022 走看看