ASP字数计算函数
2014-10-11来源:易贤网

<%

'ASP字数计算函数

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

%>

更多信息请查看IT技术专栏

2026公务员·事业单位培训课程试听报名

  • 报班类型
  • 姓名
  • 手机号
  • 验证码
推荐信息