Your Ad Here
首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 软件时空 > 软件相关 > Chr 函数
【标  题】:Chr 函数
【关键字】:Chr
【来  源】:http://blog.chinaunix.net/article.php?articleId=57276&blogId=11618

Chr 函数

Your Ad Here

chr(13) 是一个回车 Chr(10) 是个换行符

例子:把所有回车符替换为<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>

ASP 生成 彩色 可变长 验证码程序:【上一篇】
AI:【下一篇】
【相关文章】
  • 什麽是CHROOT?
  • 看不懂strrchr(),请帮忙。
  • 欢迎进入Christ的博客!
  • 通过chroot方式安装Arch Linux
  • Building a Chrooted sftp Environment on Linux
  • solaris 9下chroot dns的建立
  • chroot BIND9.2.5 on solaris8
  • javax.transaction.Synchronization翻译
  • CHRP Systems系统启动过程的LED E1DC 报错提示
  • 如何在Redhat 7.1下设置chroot DNS
  • 【随机文章】
  • 路由器配置
  • pass hp091
  • toad 8.6 新特性(一)
  • gdb命令简介
  • SPL3.1.0.5升级-加强了事务的“实时提交”功能
  • 为什么不能成功创建到oracle数据的数据链路(windows环境下)
  • 系统维护常用工具sysstat
  • ASP生成静态网页的方法
  • Gadget,又见Gadget - 浅尝Windows Live Contacts Gadget
  • JSP简明教程:行为标签与实例
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 bbb软讯网络 All Rigths Reserved.