本文章提供這款asp字符串截取函數原是是先用定義字符串判別函數判斷字符串長度以及中英文
function strvalue(str
dim p_num
dim i
if strlen(str)<=lennum then
strvalue=str
else
p_num=
x=
do while not p_num > lennum
x=x+
if asc(mid(str
p_num=int(p_num) +
else
p_num=int(p_num) +
end if
strvalue=left(trim(str)
loop
end if
end function
function strlen(str)
dim p_len
p_len=
strlen=
if trim(str)<>"" then
p_len=len(trim(str))
for xx=
if asc(mid(str
strlen=int(strlen) +
else
strlen=int(strlen) +
end if
next
end if
end function
function strcut(strcontent
dim s
on error resume next
select case cuttype
case
s
s
case
s
s
end select
if err then
strcute = "<p align=
err
exit function
else
strcut = mid(strcontent
end if
end function
From:http://tw.wingwit.com/Article/program/net/201311/14142.html