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

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

富文本二进制转换成string的更多相关文章

  1. iOS开发 将html 富文本文字 转换成oc 的富文本

    - (NSMutableAttributedString *)mf_htmlAttribute:(NSString *)htmlString{ htmlString = [NSString strin ...

  2. 如何将int整型转换成String字符串类型

    自动类型转换适用于兼容类型之间从小范围到大范围数据的转换. nt转换成String int i = 10; int b=1: System.out.pritnln(a + b); 里面靠近字符串,所以 ...

  3. Gson字符串编码,字符串转换成图片保存,二进制转换成图片保存

    import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.File; import ...

  4. Java 把 InputStream 转换成 String 的几种方法

    我们在 Java 中经常会碰到如何把 InputStream 转换成 String 的情形,比如从文件或网络得到一个 InputStream,需要转换成字符串输出或赋给别的变量. 未真正关注这个问题之 ...

  5. 把Message转换成String

    把Message转换成String注意,这里欠缺CM消息和CN消息,因为它们不是系统消息,不经过Dispatch API转发,但是可以把它们写在WndProc里,这样SendMessage送来的消息也 ...

  6. Java 里把 InputStream 转换成 String 的几种方法

    我们在 Java 中经常会碰到如何把 InputStream 转换成 String 的情形,比如从文件或网络得到一个 InputStream,需要转换成字符串输出或赋给别的变量. 未真正关注这个问题之 ...

  7. Python2.X如何将Unicode中文字符串转换成 string字符串

    Python2.X如何将Unicode中文字符串转换成 string字符串   普通字符串可以用多种方式编码成Unicode字符串,具体要看你究竟选择了哪种编码:unicodestring = u&q ...

  8. 在DataColumn.Expression把DateTime转换成String的问题

    我在使用MySql5.1的数据库中,使用winForm的DataGridView要把数据库中全称DateTime格式,转换成Date格式,就是把日期时间转换成日期,不要时间.如‘2013-07-08 ...

  9. double型转换成string型

    double型转换成string型 题目描写叙述: 如有一个函数.其可接受一个long double參数,并将參数转换为字符串.结果字符串应保留两位小数,比如,浮点值123.45678应该生成&quo ...

随机推荐

  1. PHP json_encode函数的参数说明

    PHP json_encode函数的参数说明 一.总结 一句话总结: · json_encode常常被用于将数组转换成json格式的字符串来表示,但是json_encode的第一个参数却并不一定是数组 ...

  2. 生成 XML 文档时出错。

    找来找去,在CSDN 里看到高手解答了. 原来 WebService 传递参数时,不能使用 DataTable 如果需要使用DataTable  那就要用 DataSet  包装起来. 如果担心数据太 ...

  3. Linux下 安装jdk8

    一.文件准备 1.1 文件名称 jdk-8u121-linux-x64.tar.gz 1.2 下载地址 http://www.oracle.com/technetwork/java/javase/do ...

  4. 理解MyCat分库分表

    1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18.

  5. LC 979. Distribute Coins in Binary Tree

    Given the root of a binary tree with N nodes, each node in the tree has node.val coins, and there ar ...

  6. LC 926. Flip String to Monotone Increasing

    A string of '0's and '1's is monotone increasing if it consists of some number of '0's (possibly 0), ...

  7. Android关闭通知栏后toast无法提示的解决方案

    https://github.com/getActivity/ToastUtils PS:release版本注意加上混淆规则

  8. 一个Action中,可以写多个类似的业务控制方法

    1)通过模块根路径 + 功能子路径 = 访问模块下子功能的路径 @Controller @RequestMapping(value="/user") public class Us ...

  9. [Mysql]一对多关系是如何发挥作用的?

    一个孩子只有一个妈妈,而一个妈妈可以有多个孩子,这是典型的一对多的关系,这里采用navicat图形化界面建立二者的关系. 第一步:创建mother表,如下图:  第二步:创建children表,在ch ...

  10. sqlserver2008 job设定

    数据同期: update owk ),td.) ,owk.RecordEndTime),td.) from openrowset( 'SQLOLEDB ', '172.17.1.14'; 'read' ...