ASP字数计算函数--WORDCOUNT()
类别: ASP教程
<%
\'ASP字数计算函数
\'by SBSTAR@SINA.COM
Function WordCount(strInput)
Dim strTemp
strTemp = Replace(strInput, vbTab, " ")
strTemp = Replace(strTemp, vbCr, " ")
strTemp = Replace(strTemp, vbLf, " ")
\' 删除字首字尾空格
strTemp = Trim(strTemp)
\' 替换为一个空格
Do While InStr(1, strTemp, " ", 1) <> 0
strTemp = Replace(strTemp, " ", " ")
Loop
WordCount = UBound(Split(strTemp, " ", -1, 1)) +1
End Function
%>
\'ASP字数计算函数
\'by SBSTAR@SINA.COM
Function WordCount(strInput)
Dim strTemp
strTemp = Replace(strInput, vbTab, " ")
strTemp = Replace(strTemp, vbCr, " ")
strTemp = Replace(strTemp, vbLf, " ")
\' 删除字首字尾空格
strTemp = Trim(strTemp)
\' 替换为一个空格
Do While InStr(1, strTemp, " ", 1) <> 0
strTemp = Replace(strTemp, " ", " ")
Loop
WordCount = UBound(Split(strTemp, " ", -1, 1)) +1
End Function
%>
- 上一篇: 新手初练:用ASP做一个域名查询系统
- 下一篇: 身份证校验算法与ASP程序
-= 资 源 教 程 =-
文 章 搜 索