asp字数计算函数
2015-01-12来源:易贤网

<%

'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公务员·事业单位培训课程试听报名

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