当前位置: 网学 > 编程文档 > ASP > 正文

newasp中main类

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 13/06/17
======================================
Public Function ReadTopic(ByVal str, ByVal strLen)
Dim l, t, c, i
On Error Resume Next
str = Replace(str, " ", " ")
If Len(str) < strLen Then
str = str & String(strLen - Len(str), ".")
Else
str = str
End If
l = Len(str)
t = 0
For i = 1 To l
c = Abs(Asc(Mid(str, i, 1)))
If c > 255 Then
t = t + 2
Else
t = t + 1
End If
If t >= strLen Then
ReadTopic = Left(str, i) & "..."
Exit For
Else
ReadTopic = str & "..."
End If
Next
End Function
''================================================
''函数名:strLength
''作 用:计字符串长度
''参 数:str ----字符串
''================================================
Public Function strLength(ByVal str)
On Error Resume Next
If IsNull(str) Or str = "" Then
strLength = 0
Exit Function
End If
Dim WINNT_CHINESE
WINNT_CHINESE = (Len("例子") = 2)
If WINNT_CHINESE Then
Dim l, t
Dim i, c
l = Len(str)
t = l
For i = 1 To l
c = Asc(Mid(str, i, 1))
If c < 0 Then c = c + 65536
If c > 255 Then t = t + 1
Next
strLength = t
Else
strLength = Len(str)
End If
End Function
''=================================================
''函数名:isInteger
''作 用:判断数字是否整型
''参 数:para ----参数
''=================================================
Public Function isInteger(ByVal para)
On Error Resume Next
Dim str
Dim l, i
If IsNull(para) Then
isInteger = False
Exit Function
End If
str = CStr(para)
If Trim(str) = "" Then
isInteger = False
Exit Function
End If
l = Len(str)
For i = 1 To l
If Mid(str, i, 1) > "9" Or Mid(str, i, 1) < "0" Then
isInteger = False
Exit Function
End If
Next
isInteger = True
If Err.Number <> 0 Then Err.Clear
End Function
Public Function CutString(ByVal str, ByVal strLen)
On Error Resume Next

Dim HtmlStr, l, re, strContent

HtmlStr = str
HtmlStr = Replace(HtmlStr, " ", " ")
HtmlStr = Replace(HtmlStr, """, Chr(34))
HtmlStr = Replace(HtmlStr, "'", Chr(39))
HtmlStr = Replace(HtmlStr, "{", Chr(123))
HtmlStr = Replace(HtmlStr, "}", Chr(125))
HtmlStr = Replace(HtmlStr, "$", Chr(36))
HtmlStr = Replace(HtmlStr, vbCrLf, "")
HtmlStr = Replace(HtmlStr, "====", "")
HtmlStr = Replace(Htm
  • 上一篇资讯: newasp中下载类
  • 下一篇资讯: 文章列表类别
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号