向指定位置插入字符
hjxxx 2005-12-30 05:23:15 'Insert(Str,Position,InString) 向指定位置插入字符
'Str 原始字段
'Position 位置
'InString 要插入的字符串
function Insert(Str,Position,InString)
SI=len(Str)
for i=1 to SI
hStr=hStr&left(Str,1)
Str=right(Str,(SI-i))
if i mod Position=0 then hStr=hStr&InString
next
Insert=hStr
end function
上面我写的,目的和标题一样。当然,我要处理的字符串不大(255以内)。
如果处理很长串字符的话肯定不行,不晓得有没好点的方法。
asp的!