惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Vercel News
Vercel News
F
Fortinet All Blogs
月光博客
月光博客
G
Google Developers Blog
博客园 - Franky
GbyAI
GbyAI
The Cloudflare Blog
I
InfoQ
雷峰网
雷峰网
WordPress大学
WordPress大学
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
T
The Blog of Author Tim Ferriss
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 聂微东
小众软件
小众软件
腾讯CDC
B
Blog
量子位
V
V2EX
S
SegmentFault 最新的问题
Google DeepMind News
Google DeepMind News

博客园 - 路人

IE/Firefox每次刷新时自动检查网页更新,无需手动清空缓存的设置方法 如何在VS2010中使用Async功能? 如何解决MySQLAdministrator 启动报错 转_关于图片的预加载 检索 COM 类工厂中 CLSID 为{}的组件时失败,原因是出现以下错误: 8007007e 在catch块中throw new Exception的意义 在线取色器-转 数据库查询优化-转 由于代码已经过优化或者本机框架位于调用堆栈之上,无法计算表达式 ... - 路人 - 博客园 SQLSERVER中日期显示样式(网络收集) DVD-RAM 格式化失败及视频文件分割软件 制作VCD/DVD方法 如何在oracle中导入dmp数据库文件 提高ASP.NET效率的几个方面 注册DLL的两种方法 InnerHtml and InnerText vs2003错误求救 不能上网修复网络协议 存储过程1
chr(10) chr(13) chr(32)
路人 · 2006-12-28 · via 博客园 - 路人

chr(13) 是一个回车;Chr(10) 是个换行符;chr(32) 是一个空格符;chr(13) 是一个回车;9\34 是tab,未确定?
(例子:把所有回车符替换为<br/>
#Replace(foo, Chr(13), "<br />", "ALL")#
)
所有关于 ASCII码的表格:http://www.asciitable.com
<cfscript>
/**
* 一个增强版的文章段落格式化函数
* 使用)&nbsp;替换TAB,支持多系统
* Rewrite and multiOS support by Nathan Dintenfas.
*
* @param string The string to format. (Required)
* @return Returns a string.
* @author Ben Forta (ben@forta.com)
* @version 3, June 26, 2002
*/
function Paragrap1hFormat2(str) {
//first make Windows style into Unix style
str = replace(str,chr(13)&chr(10),chr(10),"ALL");
//now make Macintosh style into Unix style
str = replace(str,chr(13),chr(10),"ALL");
//now fix tabs
str = replace(str,chr(9),"&nbsp;&nbsp;&nbsp;","ALL");
//now return the text formatted in HTML
return replace(str,chr(10),"<br />","ALL");
}
</cfscript>