- 3
- 0
- 约8.38万字
- 约 75页
- 2019-01-18 发布于湖北
- 举报
‘‘==================ASP类Class过程取除左右括号============================
Function getReplace(Str)
Str = Replace(Str,(,)
Str = Replace(Str,),)
getReplace = Trim(Str)
End Function
‘‘==================ASP类Class过程取出数组中字符组成带括号的新字符=========
Function getNewStr(tempArr)
temp =
For i = 0 To UBound(tempArr)
If temp = Then
temp = ( tempArr(i) )
Else
temp = temp ,( tempArr(i) )
End if
Next
getNewStr = temp
End Function
‘‘==================ASP类Class过程生成数组放入sql查询语句==================
Function getInsql(tempArr)
temp =
if isarray(tempArr) then
for i = 0 to ubound(tempArr)
if temp = then
temp = tempArr(i)
else
temp = temp , tempArr(i)
end if
next
end if
getInsql = temp
End Function
‘‘==================ASP类Class过程==============================
================字符串处理=======================
‘‘==================ASP类Class过程==============================
截取一定长度的字符串
Str为字符串,length为长度
Function cutStr(Str,Length)
If len(Str)Length Then
cutStr=left(Str,Length)...
Else
cutStr=Str
End If
End Function
格式化文本输出,如空格、换行
Function outputStr_BR(str)
If str Then
outputStr_BR=Server.HTMLEnCode(str)
outputStr_BR=Replace(outputStr_BR, ,nbsp;)
outputStr_BR=Replace(outputStr_BR,chr(13),br)
Else
outputStr_BR=
End If
End Function
字符安全处理
Function SafeStr(str,IfTrim)
Dim temp
temp=Replace(str,,)
If IfTrim Then
temp=Trim(temp)
End If
SafeStr=temp
End Function
不够宽度用空格填充“nbsp;”,区分汉字(2个字长)、字母(1个字长)
Function FormatLen(str,length)
Dim temp,tempLen,i
temp=str
tempLen=len(str)
i=tempLen
While i0
If len(temp)0 And Asc(right(temp,1))0 Then
tempLen=tempLen+1
End If
i=i-1
temp=left(temp,i)
Wend
If tempLenlength Then
temp=Replace(Space(length-tempLen), ,nbsp;)
End If
FormatLen=strtemp
End Function
返回半字长度
Function lLen(str)
Dim temp,tempLen,i
tempLen=0
temp=str
While Len(temp)0
If Asc(Left(temp,1))0 Then
tempLen=tempLen+2
Else
tempLen=tempLen+1
End If
temp=Right(temp,Len(temp)-1)
Wend
lLen=tempLen
End Function
返回定长的HTML格式空格
您可能关注的文档
最近下载
- Unit 6 Nurturing nature Developing ideas(天路The sky railway)课件-高二上学期英语外研版选择性必修第一册.pptx VIP
- 建筑 工程图集14J936变形缝建筑构造.pdf VIP
- 金属非金属地下矿山紧急避险系统建设规范.pdf VIP
- 蔬菜配送蔬菜安全保障措施.doc VIP
- 隧道车行、人行横洞施工方案.docx VIP
- 中职课件:心里健康与职业生涯全册课件).pptx VIP
- 人教版七年级下册数学平行线的判定及性质证明题专题训练.docx VIP
- 2026年入党第一季度思想汇报入党积极分子思想汇报(2篇).docx VIP
- Arduino嵌入式系统应用开发全套教学课件.pptx
- DB61_T 2002-2025 窄轨旅游轨道交通施工技术规范.pdf VIP
原创力文档

文档评论(0)